diff --git a/bottle.py b/bottle.py index cf1b2e53..35aa318f 100755 --- a/bottle.py +++ b/bottle.py @@ -4482,7 +4482,7 @@ def wrapper(*args, **kwargs):

Exception:

%%try: %%exc = repr(e.exception) - %%except: + %%except Exception: %%exc = '' %% type(e.exception).__name__ %%end
{{exc}}
diff --git a/test/test_outputfilter.py b/test/test_outputfilter.py index 219bd15d..2b6ca2ab 100755 --- a/test/test_outputfilter.py +++ b/test/test_outputfilter.py @@ -190,7 +190,7 @@ def test(): return 'hello' try: c = self.urlopen('/cookie')['header'].get_all('Set-Cookie', '') - except: + except Exception: c = self.urlopen('/cookie')['header'].get('Set-Cookie', '').split(',') c = [x.strip() for x in c] self.assertTrue('b=b' in c) diff --git a/test/test_wsgi.py b/test/test_wsgi.py index 1310a4f0..d34281b0 100755 --- a/test/test_wsgi.py +++ b/test/test_wsgi.py @@ -164,7 +164,7 @@ def test(): return 'hello' try: c = self.urlopen('/cookie')['header'].get_all('Set-Cookie', '') - except: + except Exception: c = self.urlopen('/cookie')['header'].get('Set-Cookie', '').split(',') c = [x.strip() for x in c] self.assertTrue('b=b' in c)