I attempted to run my solution from the browser but was told the following:
This task cannot be run on the CodeGym server.
Use IntelliJ IDEA.
I tried it on IntelliJ, and can run the task. When trying to get it verified, I get the message saying 'Unknown error during task verification"
Went back to the browser and tried the Verify function and got the following: 'You've reached the limit on the total size of task files.'
package com.codegym.task.task09.task0913;
import java.io.FileNotFoundException;
import java.net.URISyntaxException;
/*
Exceptions. Just exceptions.
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
try{
method1();
}
catch ( NullPointerException e ){
System.out.println( "NullPointerException: " + e );
}
catch ( FileNotFoundException e ){
System.out.println( "FileNotFoundException: " + e );
}
catch ( Exception e ){
System.out.println( "Exception: " + e );
}
//write your code here
}
public static void method1() throws NullPointerException, ArithmeticException, FileNotFoundException, URISyntaxException {
int i = (int) (Math.random() * 4);
if (i == 0) {
throw new NullPointerException();
}
if (i == 1) {
throw new ArithmeticException();
}
if (i == 2) {
throw new FileNotFoundException();
}
if (i == 3) {
throw new URISyntaxException("", "");
}
}
}