public static RJesObjectResult Handle(Exception exception)
        {
            RJesObjectResult rjesObjectResult = null;

            switch (exception)
            {
            case RJesErrorException error:
                rjesObjectResult = RJesObjectResultFactory.FactoryCreate(RJesStatus.error, exception.StackTrace, (RJesCode)error.RJesErrorCode, error.Message);
                break;

            case RJesFailException fail:
                rjesObjectResult = RJesObjectResultFactory.FactoryCreate(RJesStatus.fail, exception.StackTrace, (RJesCode)fail.RJesFailCode, fail.Message);
                break;

            case NotImplementedException notImplementedException:
                rjesObjectResult = RJesObjectResultFactory.NotImplemented(exception.StackTrace, notImplementedException.Message);
                break;

            case Exception ex:
                rjesObjectResult = RJesObjectResultFactory.InternalServerError(exception.StackTrace, ex.Message);
                break;
            }

            return(rjesObjectResult);
        }
Example #2
0
 public RJesNotImplementedObjectResult RJesNotImplemented(object data, string message)
 {
     return(RJesObjectResultFactory.NotImplemented(data, message));
 }
Example #3
0
 public RJesOkObjectResult RJesOK(object data, string message)
 {
     return(RJesObjectResultFactory.OK(data, message));
 }
Example #4
0
 public RJesNotFoundObjectResult RJesNotFound(object data, string message)
 {
     return(RJesObjectResultFactory.NotFound(data, message));
 }
Example #5
0
 public RJesInternalServerErrorObjectResult RJesInternalServerError(object data, string message)
 {
     return(RJesObjectResultFactory.InternalServerError(data, message));
 }
Example #6
0
 public RJesForbiddenObjectResult RJesForbidden(object data, string message)
 {
     return(RJesObjectResultFactory.Forbidden(data, message));
 }
Example #7
0
 public RJesUnauthorizedObjectResult RJesUnauthorized(object data, string message)
 {
     return(RJesObjectResultFactory.Unauthorized(data, message));
 }
Example #8
0
 public RJesBadRequestObjectResult RJesBadRequest(object data, string message)
 {
     return(RJesObjectResultFactory.BadRequest(data, message));
 }
Example #9
0
 public RJesNoContentObjectResult RJesNoContent(string message)
 {
     return(RJesObjectResultFactory.NoContent(null, message));
 }
Example #10
0
 public RJesAcceptedObjectResult RJesAccepted(object data, string message)
 {
     return(RJesObjectResultFactory.Accepted(data, message));
 }