throw a custom Exception when the size set for resize are incorrect, rat...

It makes the code cleaner (to read) and makes the exception more precise