change all methods that return default values to indicate an error occurred to throw an exception -
create various exception classes:
"negative value" - such as amount, price
"invalid identifier" - such as shop_id, user_id
instead of returning null, or -1, throw the appropriate exception.
change all methods that return default values to indicate an error occurred to throw an exception - create various exception classes: "negative value" - such as amount, price "invalid identifier" - such as shop_id, user_id
instead of returning null, or -1, throw the appropriate exception.