Exemplo n.º 1
0
        internal ExceptionHandlerPrimitive(Exception exception, string title, string message, ExceptionHandlerLevel handlerLevel, bool defaultHandler)
        {
            if (exception == null)
            {
                throw new ArgumentNullException(nameof(exception));
            }
            if (handlerLevel < ExceptionHandlerLevel.Error || handlerLevel > ExceptionHandlerLevel.Warning)
            {
                throw new InvalidEnumArgumentException(nameof(handlerLevel), (int)handlerLevel, typeof(ExceptionHandlerLevel));
            }

            _exception      = exception;
            _handlerLevel   = handlerLevel;
            _title          = title;
            _message        = message;
            _defaultHandler = defaultHandler;
        }
Exemplo n.º 2
0
 public ExceptionHandlerPrimitive(Exception exception, string title, string message, ExceptionHandlerLevel handlerLevel = ExceptionHandlerLevel.Error)
     : this(exception, title, message, handlerLevel, false)
 {
 }