HUE-5120 [core] Popup Exception should log the original stack trace
Instead of empty:
[20/Oct/2016 12:01:47 +0200] cluster INFO Resource Manager not available, trying another RM: YARN RM returned a failed response: HTTPConnectionPool(host='quickstart.cloudera', port=8088): Max retries exceeded with url: /ws/v1/cluster/apps?limit=1000&user=hue&finalStatus=UNDEFINED (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x110519050>: Failed to establish a new connection: [Errno 61] Connection refused',)).
[20/Oct/2016 12:01:47 +0200] middleware INFO Processing exception: 'SimpleLazyObject' object is not callable: Traceback (most recent call last):
File "/Users/enrico/Development/Cloudera/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/enrico/Development/Cloudera/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
return func(*args, **kwargs)
File "/Users/enrico/Development/Cloudera/hue/apps/jobbrowser/src/jobbrowser/views.py", line 143, in jobs
raise PopupException(ex)
PopupException: 'SimpleLazyObject' object is not callable
We now get:
[20/Oct/2016 03:20:18 -0700] middleware INFO Processing exception: integer division or modulo by zero: Traceback (most recent call last):
File "/home/romain/projects/hue/build/env/local/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/romain/projects/hue/build/env/local/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
return func(*args, **kwargs)
File "/home/romain/projects/hue/apps/jobbrowser/src/jobbrowser/views.py", line 143, in jobs
raise PopupException(ex)
PopupException: integer division or modulo by zero
[20/Oct/2016 03:20:18 -0700] exceptions_renderable ERROR Potential trace: [('/home/romain/projects/hue/apps/jobbrowser/src/jobbrowser/views.py', 135, 'jobs', 'jobs = get_api(request.user, request.jt).get_jobs(user=request.user, username=user, state=state, text=text, retired=retired, limit=1000)'), ('/home/romain/projects/hue/apps/jobbrowser/src/jobbrowser/api.py', 48, 'get_api', 'return YarnApi(user)'), ('/home/romain/projects/hue/apps/jobbrowser/src/jobbrowser/api.py', 183, '__init__', '1/0')]
[20/Oct/2016 03:20:18 -0700] access INFO 127.0.0.1 romain - "POST /jobbrowser/jobs/ HTTP/1.1"
Which give the exact location of the root exception.
Note: we could prettify the trace more, but unsure if we always get this format of tuples.