Example #1
0
 public CSException(CreateUserStatus status)
     : base()
 {
     Init();
     exceptionType = CSExceptionType.CreateUser;
     this.status = status;
 }
Example #2
0
 public CSException(CSExceptionType t, string message, Exception inner)
     : base(message, inner)
 {
     Init();
     this.exceptionType = t;
     this.message = message;
 }
Example #3
0
 public CSException(CreateUserStatus status, string message)
     : base(message)
 {
     Init();
     exceptionType = CSExceptionType.CreateUser;
     this.status = status;
     this.message = message;
 }
Example #4
0
        public static Message GetMessage(CSExceptionType exceptionType)
        {
            Hashtable resources = GetResource (ResourceManagerType.ErrorMessage);

            if (resources[(int) exceptionType] == null) {
                // LN 6/9/04: Changed to throw a forums exception
                throw new CSException(CSExceptionType.ResourceNotFound, "Value not found in Messages.xml for: " + exceptionType);
            }

            return (Message) resources[(int) exceptionType];
        }
Example #5
0
 public CoriaException(CSExceptionType exType, string internalMessage, Func <CSException, string> trans) : base(exType, internalMessage, trans)
 {
 }
Example #6
0
File: SiteUrls.cs Project: pcstx/OA
 public virtual string Message(CSExceptionType exceptionType, string returnUrl)
 {
     return urlData.FormatUrl("message_return", ((int) exceptionType).ToString(), returnUrl);
 }
Example #7
0
File: SiteUrls.cs Project: pcstx/OA
 public virtual string Message(CSExceptionType exceptionType)
 {
     return urlData.FormatUrl("message", ((int) exceptionType).ToString());
 }
Example #8
0
        public static void RedirectOrExcpetion(CSExceptionType csEx, string message)
        {
            CSContext context = CSContext.Current;

            if(context.IsWebRequest && !context.IsAuthenticated)
            {
                context.Context.Response.Redirect(Globals.GetSiteUrls().Login);
                context.Context.Response.End();
            }
            else
                throw new CSException(csEx, message);
        }
Example #9
0
 public CSException(CSExceptionType t)
     : base()
 {
     Init();
     this.exceptionType = t;
 }
        internal static void Log(Exception exception, CSExceptionType exceptionType, string msg, params Object[] args)
        {
            string logMsg = string.Format(msg, args);

            throw new Exception(logMsg);
        }