You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,9 +109,10 @@ def index(request):
109
109
return response
110
110
111
111
except StandardError as stdErr:
112
-
# Log the Error
113
-
print stdErr.message
114
-
raise
112
+
# There was an error validationg the request
113
+
# Use your own logging framework to log the Exception
114
+
# This was a configuration exception, so we let the user continue
115
+
print stdErr.message
115
116
```
116
117
117
118
## Alternative Implementation
@@ -190,9 +191,10 @@ def index(request):
190
191
return response
191
192
192
193
except StandardError as stdErr:
193
-
# Log the Error
194
-
print stdErr.message
195
-
raise
194
+
# There was an error validationg the request
195
+
# Use your own logging framework to log the Exception
196
+
# This was a configuration exception, so we let the user continue
197
+
print stdErr.message
196
198
```
197
199
### Protecting ajax calls on static pages
198
200
If you have some static html pages (might be behind cache servers) and you have some ajax calls from those pages needed to be protected by KnownUser library you need to follow these steps:
@@ -271,7 +273,8 @@ def index(request):
271
273
return response
272
274
273
275
except StandardError as stdErr:
274
-
# Log the Error
275
-
print stdErr.message
276
-
raise
276
+
# There was an error validationg the request
277
+
# Use your own logging framework to log the Exception
278
+
# This was a configuration exception, so we let the user continue
0 commit comments