When I said "Error HERE", I meant change the text to your error message. Replace that with "margin must be greater than zero", and make that an IllegalStateException