Skip to content

Commit 59bd3d2

Browse files
authored
Update README.md
- updated comments in except sections - removed raise in except sections
1 parent 4525e9a commit 59bd3d2

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ def index(request):
109109
return response
110110

111111
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
115116
```
116117

117118
## Alternative Implementation
@@ -190,9 +191,10 @@ def index(request):
190191
return response
191192

192193
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
196198
```
197199
### Protecting ajax calls on static pages
198200
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):
271273
return response
272274

273275
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
279+
print stdErr.message
277280
```

0 commit comments

Comments
 (0)