Kirzilla Kirzilla - 1 year ago 53
PHP Question

php: catch exception and continue execution, is it possible?

Is it possible to catch exception and continue execution of script?

Answer Source

Sure, just catch the exception where you want to continue execution...

  catch (SomeException $e)
      // do nothing... php will ignore and continue    

Of course this has the problem of silently dropping what could be a very important error. SomeOperation() may fail causing other subtle, difficult to figure out problems, but you would never know if you silently drop the exception.