Exemplo n.º 1
0
        /// <summary>Create a new exception with a given message, kind,
        /// and stack trace, and throw a wrapped version of it</summary>
        /// <param name="kind">Exception kind</param>
        /// <param name="message">Human-readable message for exception</param>
        public static void Throw(GraceExceptionKind kind, string message)
        {
            var gep  = new GraceExceptionPacket(kind, message);
            var gepe = new GraceExceptionPacketException(gep);

            throw gepe;
        }
Exemplo n.º 2
0
 /// <param name="kind">ExceptionKind of this packet</param>
 /// <param name="message">Human-readable message</param>
 /// <param name="stackTrace">List of human-readable strings
 /// describing the stack at the point this exception was
 /// created</param>
 public GraceExceptionPacket(GraceExceptionKind kind, string message,
                             List <string> stackTrace)
 {
     this.message    = message;
     KindName        = kind.Name;
     this.stackTrace = stackTrace;
     initialise();
 }
Exemplo n.º 3
0
 /// <param name="kind">ExceptionKind of this packet</param>
 /// <param name="message">Human-readable message</param>
 public GraceExceptionPacket(GraceExceptionKind kind, string message)
 {
     this.message = message;
     KindName     = kind.Name;
     initialise();
 }
Exemplo n.º 4
0
 /// <param name="parent">Parent of this exception kind</param>
 /// <param name="name">Name of this exception kind</param>
 public GraceExceptionKind(GraceExceptionKind parent, string name)
 {
     Parent = parent;
     Name   = name;
     initialise();
 }