I think that all Error and Exception type extend from Exception class so how could i watch exception when the application stopped working because i want to run some logic when the exception thrown i am not just asking about try{} catch {} finally {}
if i want to make plugin to watch on any exception happen on application to run my logic
example if you have application named X and you have library named Y how could library Y watch and run logic when X throw Exception without edit on logic of X code