mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Improved error message in urlresolvers (fixes #240)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -38,8 +38,10 @@ class RegexURLPattern: | ||||
|         mod_name, func_name = get_mod_func(self.callback) | ||||
|         try: | ||||
|             return getattr(__import__(mod_name, '', '', ['']), func_name) | ||||
|         except (ImportError, AttributeError), e: | ||||
|             raise ViewDoesNotExist, "Tried %s. Error was: %s" % (self.callback, str(e)) | ||||
|         except ImportError, e: | ||||
|             raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e)) | ||||
|         except AttributeError, e: | ||||
|             raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)) | ||||
|  | ||||
| class RegexURLMultiplePattern: | ||||
|     def __init__(self, regex, urlconf_module): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user