如下编写try-catch块是一个很好的设计实践吗?也就是说,在try块中使用throw,然后在catch块中捕获它.
try { if (someCondition){ throw new Exception("Go the the associated catch block!"); } } catch(Exception ex) { logError("I was thrown in the try block above"); }