better solution with try and catch
Revert "better solution with try and catch"

This reverts commit 4121a1be60d063150bbff7545c24cd709c228676.