Skip to content

Commit

Permalink
Adds an exception when the MOErrorException
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Oct 16, 2023
1 parent 53cb4ed commit 8c2b581
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public MOErrorException(final UInteger errorNumber, final Object extraInformatio
super();

if (errorNumber == null) {
throw new IllegalArgumentException("Number argument must not be NULL");
throw new IllegalArgumentException("The errorNumber argument cannot not be NULL!");
}

if (errorNumber.getValue() == 0) {
throw new IllegalArgumentException("The errorNumber argument cannot be zero!");
}

this.errorNumber = errorNumber;
Expand Down

0 comments on commit 8c2b581

Please sign in to comment.