ErrorCode.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace ETModel
  2. {
  3. public static class ErrorCode
  4. {
  5. public const int ERR_Success = 0;
  6. // 100000 以上,避免跟SocketError冲突
  7. public const int ERR_MyErrorCode = 100000;
  8. public const int ERR_Exception = 200000;
  9. public const int ERR_NotFoundActor = 100002;
  10. public const int ERR_ActorNoMailBoxComponent = 100003;
  11. public const int ERR_ActorTimeOut = 100004;
  12. public const int ERR_PacketParserError = 100005;
  13. public const int ERR_AccountOrPasswordError = 100102;
  14. public const int ERR_SessionActorError = 100103;
  15. public const int ERR_NotFoundUnit = 100104;
  16. public const int ERR_ConnectGateKeyError = 100105;
  17. public const int ERR_RpcFail = 102001;
  18. public const int ERR_SocketDisconnected = 102002;
  19. public const int ERR_ReloadFail = 102003;
  20. public const int ERR_ActorLocationNotFound = 102004;
  21. public static bool IsRpcNeedThrowException(int error)
  22. {
  23. if (error == 0)
  24. {
  25. return false;
  26. }
  27. if (error > ERR_Exception)
  28. {
  29. return false;
  30. }
  31. return true;
  32. }
  33. }
  34. }