diff options
Diffstat (limited to 'app/Exception.hs')
-rw-r--r-- | app/Exception.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/Exception.hs b/app/Exception.hs index 49c9cb6..a809616 100644 --- a/app/Exception.hs +++ b/app/Exception.hs @@ -5,12 +5,16 @@ module Exception ProcessException (..), UnknownFileExtension (..), InvalidDiff (..), + InvalidIssue (..), ) where +import CMark qualified as D import Control.Exception import Data.ByteString.Lazy.Char8 as LB +import Data.Void (Void) import System.Exit (ExitCode) +import Text.Megaparsec qualified as P data AnyException = InvalidTreeGrepperResult' InvalidTreeGrepperResult @@ -18,6 +22,7 @@ data AnyException | ProcessException' ProcessException | UnknownFileExtension' UnknownFileExtension | InvalidDiff' InvalidDiff + | InvalidIssue' InvalidIssue deriving (Show) instance Exception AnyException @@ -50,3 +55,8 @@ data InvalidDiff = InvalidDiff String deriving (Show) instance Exception InvalidDiff + +data InvalidIssue = InvalidIssue (P.ParseErrorBundle [D.Node] Void) + deriving (Show) + +instance Exception InvalidIssue |