This message is created in response to an error generated while processing a RPC Request and will serve as a replacement for a RPC Response message. [message_type, request_id, exception_type, exception_msg, traceback] message_type(int) This will be a RPC_ERROR type id. request_id(int) The request_id is the same as the one sent by the client in the initial request. exception_type(str) The type of exception raised. exception_msg(str) The message as to why the exception was raised. traceback(str) The traceback of the generated exception.
示例#1
0
 private void UnhandledError(object[] response)
 {
     var error = new RPCErrorMessage(response);
     switch (error.ExceptionType)
     {
         case "BadLoginError":
             throw new ApplicationException(error.ExceptionMessage);
             break;
         default:
             var ex = new ApplicationException("Unknown error type: " + error.ExceptionType);
             ex.Data.Add("Message", error.ExceptionMessage);
             ex.Data.Add("Traceback", error.Traceback);
             throw ex;
     }
 }
示例#2
0
 private static void HandleError(RPCErrorMessage e)
 {
     e.PrintDump();
 }