Example #1
0
        /// <summary>
        /// Registers an exception that occurred.
        /// </summary>
        /// <param name="ex">The exception that occurred.</param>
        public static void RegisterException(Exception ex)
        {
            Contract.Requires(ex != null);

            _log.Error("{0} caught:", ex.GetType().Name);
            PrintException(ex);

            var info = new ExceptionInfo(ex);
            _exceptionList.Add(info);

            var evnt = ExceptionOccurred;
            if (evnt != null)
                evnt(null, new ExceptionEventArgs(info));
        }
Example #2
0
        public ExceptionEventArgs(ExceptionInfo info)
        {
            Contract.Requires(info != null);

            Info = info;
        }
        public ExceptionEventArgs(ExceptionInfo info)
        {
            Contract.Requires(info != null);

            Info = info;
        }