/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. namespace Debugger
  4. {
  5. /// <summary>
  6. /// Type of exception thrown by the Debugger.
  7. /// </summary>
  8. public class DebuggerException: System.Exception
  9. {
  10. public DebuggerException() {}
  11. public DebuggerException(string message): base(message) {}
  12. public DebuggerException(string message, params object[] args): base(string.Format(message, args)) {}
  13. public DebuggerException(string message, System.Exception inner): base(message, inner) {}
  14. }
  15. /// <summary>
  16. /// An exception that is thrown when the debugged process unexpectedly exits.
  17. /// </summary>
  18. public class ProcessExitedException: DebuggerException
  19. {
  20. string processName = null;
  21. /// <summary>
  22. /// The name of the process that has exited.
  23. /// </summary>
  24. public string ProcessName {
  25. get { return processName; }
  26. }
  27. /// <summary>
  28. /// Creates a ProcessExitedException for an unnamed process.
  29. /// </summary>
  30. public ProcessExitedException(): base("Process exited") {}
  31. /// <summary>
  32. /// Creates a ProcessExitedException for a process.
  33. /// </summary>
  34. /// <param name="processName">The name of the process</param>
  35. public ProcessExitedException(string processName): base(string.Format("Process '{0}' exited.", processName)) {
  36. this.processName = processName;
  37. }
  38. }
  39. }