Consider throwing different types of exceptions for the different error types. http://www.mbtest.org/docs/api/errors