Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1.     public static void someMethod1() {
  2.         // ...
  3.         if (problem) {
  4.             throw new Exception("Usefull Message.");
  5.         }
  6.         // ...
  7.     }
  8.  
  9.     public static void someMethod2() {
  10.         // ...
  11.         if (problem) {
  12.             Exception("Usefull Message.");
  13.         }
  14.         // ...
  15.     }
  16.  
  17.     public static void someMethod3() throws Exception {
  18.         // ...
  19.         if (problem) {
  20.             throw (new Exception("Usefull Message."));
  21.         }
  22.         // ...
  23.     }
  24.  
  25.     public static void someMethod4() throws Exception {
  26.         // ...
  27.         if (problem) {
  28.             throw new Exception("Usefull Message.");
  29.         }
  30.         // ...
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement