I can see why you want it borderless and it looks good.

I agree that it's not a good idea to display the error in the function. I think that every function should have a return and it should be up to the calling procedure to decide what to do with the return value. The use of a Boolean can only say success/non-success. An Integer however can say success (when 0) and non-success (any other value). The advantage of the Integer is of course that if you want to know why it failed, the value will tell you.