Example #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(string kind, string message)
        {
            var gep  = new GraceExceptionPacket(kind, message);
            var gepe = new GraceExceptionPacketException(gep);

            throw gepe;
        }
Example #2
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>
        /// <param name="stackTrace">Human-readable stack trace</param>
        public static void Throw(GraceExceptionKind kind, string message,
                                 List <string> stackTrace)
        {
            var gep  = new GraceExceptionPacket(kind, message, stackTrace);
            var gepe = new GraceExceptionPacketException(gep);

            throw gepe;
        }