Return 'undefined' when throwing an exception