public void DangerousFunc1() { try { DangerousFunc2(); } catch (System.Exception e) { MyCustomException ex = new MyCustomException("E3 - Custom Exception Situation!", e); throw ex; } }
public void DangerousFunc1() { try { DangerousFunc2(); } //ako ovdje ulovi iznimku, izbacuje prilagodjenu iznimku catch (Exception e) { MyCustomException ex = new MyCustomException("E3 - Custom Exception Situation!", e); throw ex; } }
public void DangerousFunc1() { try { DangerousFunc2(); } // if you catch any exception here // throw a custom exception catch (System.Exception e) { MyCustomException ex = new MyCustomException( "E3 - Custom Exception Situation!", e); throw ex; } }