Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void someMethod1() {
- // ...
- if (problem) {
- throw new Exception("Usefull Message.");
- }
- // ...
- }
- public static void someMethod2() {
- // ...
- if (problem) {
- Exception("Usefull Message.");
- }
- // ...
- }
- public static void someMethod3() throws Exception {
- // ...
- if (problem) {
- throw (new Exception("Usefull Message."));
- }
- // ...
- }
- public static void someMethod4() throws Exception {
- // ...
- if (problem) {
- throw new Exception("Usefull Message.");
- }
- // ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement