catch runtime_error exception, fixes #10