The method is used by OPT to generate exceptions. The $level is one of: E_USER_ERROR or E_USER_WARNING. For the user error messages, the codes from 401 are reserved.