Esempio n. 1
0
        /// <summary>
        /// Handles the specified error.
        /// </summary>
        /// <param name="error">The error.</param>
        /// <param name="exception">The exception.</param>
        /// <param name="errors">The error results.</param>
        /// <param name="arguments">The arguments.</param>
        private static void InternalHandle(string error, Exception exception)
        {
            _provider.Handle(error, exception);
            return;

            // if (!_namedHandlers.ContainsKey(handler))
            //    throw new ArgumentException("Unknown exception handler : " + handler);

            // IErrorManager exceptionManager = _namedHandlers[handler];
            // exceptionManager.Handle(error, exception);
        }
        /// <summary>
        /// Handles the specified error.
        /// </summary>
        /// <param name="error">The error.</param>
        /// <param name="exception">The exception.</param>
        /// <param name="errors">The error results.</param>
        /// <param name="arguments">The arguments.</param>
        private static void InternalHandle(object error, Exception exception, string handler, IErrors errors, object[] arguments)
        {
            if (handler == null)
            {
                _provider.Handle(error, exception, errors, arguments);
                return;
            }

            if (!_namedHandlers.ContainsKey(handler))
            {
                throw new ArgumentException("Unknown exception handler : " + handler);
            }

            IErrorManager exceptionManager = _namedHandlers[handler];

            exceptionManager.Handle(error, exception, errors, arguments);
        }