Define the catch clause without the exception variable as follows:
try {
someMethod();
} catch (XYZException) {
// do something without using e
}
Define the catch clause without the exception variable as follows:
try {
someMethod();
} catch (XYZException) {
// do something without using e
}