Exceptions Handling / conditional catch (try catch if)

by Mohan 2012-09-20 23:50:47


Exceptions Handling / conditional catch (try catch if)
function Toto(){}
function Titi(){}

try {

throw new Titi()

} catch ( err if err instanceof Toto ) {
Print('toto')
} catch ( err if err instanceof Titi ) {
Print('titi')
} catch(ex) {
throw(ex);
}
________________________________________



936
like
0
dislike
0
mail
flag

You must LOGIN to add comments