def test_catching(self):
        
        def catchtest(x):
            try:
                if x == 1:
                    raise ValueError('foo')
                elif x == 2:
                    raise RuntimeError('foo')
                else:
                    raise "oh crap"
            except ValueError:
                print('value-error')
            except RuntimeError:
                print('runtime-error')
            except Exception:
                print('other-error')
            return undefined
        
        assert evaljs(py2js(catchtest, 'f') + 'f(1)') == 'value-error'
        assert evaljs(py2js(catchtest, 'f') + 'f(2)') == 'runtime-error'
        assert evaljs(py2js(catchtest, 'f') + 'f(3)') == 'other-error'
dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser2.py/TestExceptions.test_catching/original