Add catch exception instead of throwing

See #525