fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. try
  8. {
  9. throw new My_Exception(" Password is too small ");
  10. }
  11. catch (My_Exception exception)
  12. {
  13. Console.WriteLine("An exception occurred:\n" + exception);
  14. }
  15. }
  16. }
  17.  
  18. public class My_Exception : Exception
  19. {
  20.  
  21. public My_Exception(string message) : base(message)
  22. {
  23. //Console.WriteLine(message);
  24. }
  25.  
  26. }
Success #stdin #stdout 0.03s 16916KB
stdin
Standard input is empty
stdout
An exception occurred:
My_Exception:  Password is too small 
  at Test.Main () [0x0000a] in <ef069092328b4a7f8a931837f194b54c>:0