@@ -6,30 +6,30 @@ public class Main {
66 public static void main (String [] args ) throws Exception {
77 RedGuyApi redGuyApi = new RedGuyApi (System .getenv ("TOKEN" ));
88 if (redGuyApi .math ().get (NumberLevels .factorial ,2 ) != 2 ) {
9- throw new Exception ("Incorrect result!" );
9+ throw new IllegalArgumentException ("Incorrect result!" );
1010 } else {
1111 System .out .println ("math.get - OK!" );
1212 }
1313 System .out .println ("math.max - OK! Got:" +redGuyApi .math ().max (NumberLevels .factorial ));
1414 if (redGuyApi .users ().get (1 ).getId () != 1 ) {
15- throw new Exception ("Incorrect result!" );
15+ throw new IllegalArgumentException ("Incorrect result!" );
1616 } else {
1717 System .out .println ("users.get - OK!" );
1818 }
1919
2020 int wins = redGuyApi .event ().Wins ().get ("b12" );
2121 ValueChange add = redGuyApi .event ().Wins ().add ("b12" ,1 );
2222 if ((int )add .getOldValue () != wins ) {
23- throw new Exception ("Incorrect result!" );
23+ throw new IllegalArgumentException ("Incorrect result!" );
2424 }
2525 ValueChange set = redGuyApi .event ().Wins ().set ("b12" ,wins );
2626 if ((int )set .getNewValue () != wins ) {
27- throw new Exception ("Incorrect result!" );
27+ throw new IllegalArgumentException ("Incorrect result!" );
2828 }
2929 System .out .println ("Event.Wins.* - OK!" );
3030
3131 if (!redGuyApi .teams ().get (195680093 , "vk" ).get (0 ).team .name .equals ("RedGuyGames" )) {
32- throw new Exception ("Incorrect result!" );
32+ throw new IllegalArgumentException ("Incorrect result!" );
3333 }
3434 System .out .println ("Teams.get - OK!" );
3535 }
0 commit comments