public void someMethod() throws MyCustomException { try { // Some code that might throw an exception } catch (AnotherException e) { // Some handling throw new MyCustomException("Custom message", e); } }
public void someMethod() throws MyCustomException { try { // Some code that might throw an exception } catch (AnotherException e) { // Some handling throw new MyCustomException("Custom message", e); } }