PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Debugger/Debugger.Core/DebuggerException.cs

http://github.com/icsharpcode/ILSpy
C# | 45 lines | 21 code | 6 blank | 18 comment | 0 complexity | 8b5d17717d8647d6699d4b93bf4efa25 MD5 | raw file
 1// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 2// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 3
 4namespace Debugger
 5{
 6	/// <summary>
 7	/// Type of exception thrown by the Debugger.
 8	/// </summary>
 9	public class DebuggerException: System.Exception
10	{
11		public DebuggerException() {}
12		public DebuggerException(string message): base(message) {}
13		public DebuggerException(string message, params object[] args): base(string.Format(message, args)) {}
14		public DebuggerException(string message, System.Exception inner): base(message, inner) {}
15	}
16	
17	/// <summary>
18	/// An exception that is thrown when the debugged process unexpectedly exits.
19	/// </summary>
20	public class ProcessExitedException: DebuggerException
21	{
22		string processName = null;
23		
24		/// <summary>
25		/// The name of the process that has exited.
26		/// </summary>
27		public string ProcessName {
28			get { return processName; }
29		}
30		
31		/// <summary>
32		/// Creates a ProcessExitedException for an unnamed process.
33		/// </summary>
34		public ProcessExitedException(): base("Process exited") {}
35		
36		/// <summary>
37		/// Creates a ProcessExitedException for a process.
38		/// </summary>
39		/// <param name="processName">The name of the process</param>
40		public ProcessExitedException(string processName): base(string.Format("Process '{0}' exited.", processName)) {
41			this.processName = processName;
42		}
43		
44	}
45}