summaryrefslogtreecommitdiff
path: root/planet/planetadmin/exceptions.py
blob: 8f3f4b84a33e2096e040641ffd9d96e04e059d6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from django.shortcuts import render_to_response

class pExcept(Exception):
        pass

class PlanetExceptionMiddleware:
	def process_exception(self, request, exception):
		if isinstance(exception, pExcept):
			return render_to_response('internal_error.html', {
				'msg': exception
			})
		return None