handling exception instead of throwable