catch exception and returns $default