Example #1
0
 public static void Throw(ErrorOrigin origin, String message)
 {
     throw new Exception(
               Print.Alert(
                   "Error",
                   Print.SubContent(new string[] {
         Print.Message(origin.ToString(), message)
     }
                                    )
                   )
               );
 }
Example #2
0
        protected virtual void OnLog(string Message, ErrorType ErrorType, ErrorOrigin origin)
        {
            var icon = MessageBoxIcon.Error;

            if (ErrorType == ErrorType.Warning)
            {
                icon = MessageBoxIcon.Warning;
            }
            else if (ErrorType == ErrorType.Information || ErrorType == ErrorType.Message)
            {
                icon = MessageBoxIcon.Information;
            }

            MessageBox.Show(Message, origin.ToString() + " " + ErrorType.ToString(), MessageBoxButtons.OK, icon);

            try
            {
                if (origin == ErrorOrigin.System)
                {
                    File.AppendAllText(IDEInterface.ConfigDirectory + "\\sys.log", Message + "\r\n", System.Text.Encoding.Unicode);
                }
            }
            catch { }
        }
Example #3
0
		protected virtual void OnLog(string Message, ErrorType ErrorType, ErrorOrigin origin)
		{
			var icon = MessageBoxIcon.Error;
			if (ErrorType==ErrorType.Warning)
				icon = MessageBoxIcon.Warning;
			else if (ErrorType==ErrorType.Information || ErrorType==ErrorType.Message)
				icon = MessageBoxIcon.Information;

			MessageBox.Show(Message,origin.ToString() +" "+ ErrorType.ToString(),MessageBoxButtons.OK,icon);

			try
			{
				if (origin == ErrorOrigin.System)
					File.AppendAllText(IDEInterface.ConfigDirectory + "\\sys.log", Message + "\r\n", System.Text.Encoding.Unicode);
			}
			catch { }
		}