Exemplo n.º 1
0
        private void checkForErrors(XmlDocument document)
        {
            XmlNode n = document.GetElementsByTagName("lfm")[0];

            string status = n.Attributes[0].InnerText;

            if (status == "failed")
            {
                XmlNode err = document.GetElementsByTagName("error")[0];
                ServiceExceptionType type = (ServiceExceptionType)Convert.ToInt32(err.Attributes[0].InnerText);
                string description        = err.InnerText;
            }
        }
Exemplo n.º 2
0
        private static string ExceptionTypeToString(ServiceExceptionType exceptionType)
        {
            switch (exceptionType)
            {
            case ServiceExceptionType.UserAlreadyExist:
                return("User already exist");

            case ServiceExceptionType.NotEnoughtBalance:
                return("Not enought balance");

            case ServiceExceptionType.EntityNotFound:
                return("Entity not found");

            default:
                throw new NotSupportedException();
            }
        }
Exemplo n.º 3
0
 public ServiceException(ServiceExceptionType type, string description)
     : base()
 {
     this.Type = type;
       this.Description = description;
 }
Exemplo n.º 4
0
 public ServiceException(ServiceExceptionType type, string description)
     : base()
 {
     this.Type        = type;
     this.Description = description;
 }
 public ServiceException(string message, Exception innerException, ServiceExceptionType type, [CallerMemberName] string name = "", [CallerLineNumber] int line = -1, [CallerFilePath] string path = "") : base(message, innerException)
 {
     CreateCode(name, line, path);
 }
 public ServiceException(ServiceExceptionType type, [CallerMemberName] string name = "", [CallerLineNumber] int line = -1, [CallerFilePath] string path = "")
 {
     Type = type;
     CreateCode(name, line, path);
 }
Exemplo n.º 7
0
 public ServiceException(ServiceExceptionType type)
 {
     Type = type;
 }
Exemplo n.º 8
0
 public ServiceException(ServiceExceptionType type, string message = null,
     Exception innerException = null)
     : base(message, innerException)
 {
     _type = type;
 }
Exemplo n.º 9
0
 public ServiceException(string dubugInfo, ServiceExceptionType exceptionType)
 {
     this.DebugInfo     = dubugInfo;
     this.ExceptionType = exceptionType;
 }
Exemplo n.º 10
0
 public ServiceException(ServiceExceptionType exceptionType) : this(ExceptionTypeToString(exceptionType), exceptionType)
 {
     ServiceExceptionType = exceptionType;
 }
Exemplo n.º 11
0
 public ServiceException(string message, ServiceExceptionType exceptionType) : base(message)
 {
     ServiceExceptionType = exceptionType;
 }
Exemplo n.º 12
0
 public ServiceException(string msg, ServiceExceptionType type) : base(msg) => Type = type;
Exemplo n.º 13
0
 public ServiceException(ServiceExceptionType type, string message)
     : this(type, message, null)
 {
 }
Exemplo n.º 14
0
 public ServiceException(ServiceExceptionType type, string message, Exception innerException)
     : base(message, innerException)
 {
     Type = type;
 }
Exemplo n.º 15
0
 public ServiceException(Exception innerException, ServiceExceptionType exceptionType)
 {
     InnerException = innerException;
     ExceptionType = exceptionType;
 }
 public ServiceException(string dubugInfo, ServiceExceptionType exceptionType)
 {
     this.DebugInfo = dubugInfo;
     this.ExceptionType = exceptionType;
 }