private void methodA(){ try { ...do some code methodB(); } catch (exception e) { messagebox.show(e.message); }} private void methodB(){ do some code that errors...}