这可能在
PHP?
try { $obj = new Clas(); if ($obj->foo) { // how to exit from this try block? } // do other stuff here } catch(Exception $e) { }
try { $object = new Something(); if ($object->value) { // do stuff } else { // do other stuff } } catch (Exception $e) { // handle exceptions }