Java:Throwable compilation error must be caught or declared to be thrown

in the following statement, if throw T1 is replaced with throw t, there will be a compilation error. Why is must be caught or declared to be thrown,?

    try{
        FileInputStream fis = new FileInputStream(file);
        Throwable t = null;
        try{
            fis.read();
        }catch (Throwable t1){
            t = t1;
            throw t1;
        } finally{
            ...
        }
    } catch(Exception e){
        ...
    }
Mar.23,2021

except for RuntimeException and its subclasses, all exceptions are handled
I wonder if you can compile throw T1?

Edit:
the outermost catch is Exception , and t is Throwable , which is the parent object of Exception and cannot be captured. You can change the outermost Exception to Throwable to see
, while T1 is actually IOException , so you can capture

.
Menu