Permalink
Browse files

Document file upload exception hierarchy

  • Loading branch information...
1 parent 6b4fe70 commit a0b5853787963aa8cb4b76f17810746e957f0061 @gregorycollins gregorycollins committed Feb 5, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/Snap/Util/FileUploads.hs
@@ -297,6 +297,12 @@ data PartInfo =
------------------------------------------------------------------------------
+-- | All of the exceptions defined in this package inherit from
+-- 'FileUploadException', so if you write
+--
+-- > foo `catch` \(e :: FileUploadException) -> ...
+--
+-- you can catch a 'BadPartException', a 'PolicyViolationException', etc.
data FileUploadException =
GenericFileUploadException {
_genericFileUploadExceptionReason :: Text

0 comments on commit a0b5853

Please sign in to comment.