Example #1
0
 public QueryError(string message, string sqlState, int errorCode, string errorName, string errorType, ErrorLocation errorLocation, FailureInfo failureInfo)
 {
     this.Message       = message;
     this.SqlState      = sqlState;
     this.ErrorCode     = errorCode;
     this.ErrorName     = errorName;
     this.ErrorType     = errorType;
     this.ErrorLocation = errorLocation;
     this.FailureInfo   = failureInfo;
 }
Example #2
0
        public PrestoFailureException(string message, string type, IEnumerable <string> stack, FailureInfo cause) : base(message)
        {
            if (stack == null)
            {
                throw new ArgumentNullException("stack");
            }

            this.Type       = type;
            this.StackTrace = String.Join("\n", stack);
            this.Cause      = cause ?? throw new ArgumentNullException("cause");
        }
Example #3
0
        private static PrestoFailureException ToException(FailureInfo failureInfo)
        {
            if (failureInfo == null)
            {
                return(null);
            }

            return(new PrestoFailureException(
                       failureInfo.Message,
                       failureInfo.Type,
                       failureInfo.Stack,
                       failureInfo.Cause
                       ));
        }
Example #4
0
        public FailureInfo(
            string type,
            string message,
            FailureInfo cause,
            IEnumerable <FailureInfo> suppressed,
            IEnumerable <string> stack,
            ErrorLocation errorLocation
            )
        {
            if (string.IsNullOrEmpty(type))
            {
                throw new ArgumentNullException("type");
            }

            this.Type          = type;
            this.Message       = message;
            this.Cause         = cause;
            this.Suppressed    = suppressed ?? throw new ArgumentNullException("suppressed");
            this.Stack         = stack;
            this.ErrorLocation = errorLocation;
        }