Example #1
0
        public void ThrowException(string message, ExceptionSeverity severity = ExceptionSeverity.Warning, params string[] values)
        {
            string         mess = string.Format(message, values);
            LinksException ex   = new LinksException(mess, severity);

            // TODO: send an email if error
            throw ex;
        }
Example #2
0
        public void ThrowInfoException(string message, params string[] values)
        {
            string mess = values != null?string.Format(message, values) : message;

            LinksException ex = new LinksException(mess, ExceptionSeverity.Info);

            throw ex;
        }
Example #3
0
        public void ThrowException(string message, params string[] values)
        {
            string mess = string.Format(message, values);

            LinksException ex = new LinksException(mess, ExceptionSeverity.Warning);

            // TODO: put a warning and up severity message into the log, send an email if error

            log.Log(ExceptionSeverity.Warning, mess);
            throw ex;
        }
Example #4
0
        public void ThrowNotLoggedInException()
        {
            LinksException ex = new LinksException(401, null, ExceptionSeverity.Info);

            throw ex;
        }