bugsnag-haskell 0.0.4.1 → 0.0.4.2
raw patch · 30 files changed
+265/−242 lines, 30 filesdep ~aesondep ~aeson-qqdep ~bytestringPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: aeson, aeson-qq, bytestring, case-insensitive, containers, doctest, hspec, http-client, http-client-tls, http-conduit, http-types, iproute, network, parsec, template-haskell, text, th-lift-instances, time, ua-parser, unliftio, wai, warp, yaml, yesod-core
API changes (from Hackage documentation)
+ Data.Aeson.Ext: fromText :: Text -> Key
Files
- CHANGELOG.md +5/−1
- DocTest.hs +2/−3
- README.md +7/−2
- bugsnag-haskell.cabal +201/−168
- src/Data/Aeson/Ext.hs +12/−3
- src/Network/Bugsnag.hs +1/−2
- src/Network/Bugsnag/App.hs +1/−2
- src/Network/Bugsnag/BeforeNotify.hs +1/−2
- src/Network/Bugsnag/Breadcrumb.hs +1/−2
- src/Network/Bugsnag/BugsnagRequestHeaders.hs +3/−3
- src/Network/Bugsnag/CodeIndex.hs +1/−2
- src/Network/Bugsnag/Device.hs +1/−2
- src/Network/Bugsnag/Event.hs +3/−3
- src/Network/Bugsnag/Exception.hs +2/−3
- src/Network/Bugsnag/Exception/Parse.hs +1/−2
- src/Network/Bugsnag/Notifier.hs +1/−2
- src/Network/Bugsnag/Notify.hs +1/−2
- src/Network/Bugsnag/ReleaseStage.hs +1/−2
- src/Network/Bugsnag/Report.hs +1/−2
- src/Network/Bugsnag/Reporter.hs +1/−2
- src/Network/Bugsnag/Request.hs +1/−2
- src/Network/Bugsnag/Session.hs +1/−2
- src/Network/Bugsnag/Settings.hs +1/−4
- src/Network/Bugsnag/Severity.hs +1/−2
- src/Network/Bugsnag/StackFrame.hs +1/−7
- src/Network/Bugsnag/Thread.hs +1/−2
- src/Network/Bugsnag/User.hs +1/−2
- test/Network/Bugsnag/CodeIndexSpec.hs +1/−2
- test/Network/Bugsnag/ReportSpec.hs +1/−2
- test/Network/BugsnagSpec.hs +9/−7
CHANGELOG.md view
@@ -1,6 +1,10 @@-## [_Unreleased_](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.4.1...master)+## [_Unreleased_](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.4.2...main) None.++## [v0.0.4.2](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.4.1...v0.0.4.2)++- Support Aeson 2.0 ## [v0.0.4.1](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.4.0...v0.0.4.1)
DocTest.hs view
@@ -1,7 +1,6 @@ module Main ( main- )-where+ ) where import Prelude @@ -18,4 +17,4 @@ main :: IO () main = do Package extensions <- Yaml.decodeFileThrow "package.yaml"- doctest $ ["-isrc", "src/"] <> map ("-X" <>) extensions+ doctest $ ["src"] <> map ("-X" <>) extensions
README.md view
@@ -1,5 +1,8 @@ # Bugsnag error reporter for Haskell +[](https://github.com/pbrisbin/bugsnag-haskell/actions/workflows/ci.yml)+[](https://github.com/pbrisbin/bugsnag-haskell/actions/workflows/nightly.yml)+ Catch and report exceptions in your Haskell code. ## Configuration@@ -8,7 +11,8 @@ settings <- newBugsnagSettings "BUGSNAG_API_KEY" ``` -See [`Network.Bugsnag.Settings`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Settings.html).+See+[`Network.Bugsnag.Settings`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Settings.html). ## Reporting an Error @@ -19,7 +23,8 @@ ] ``` -See [`Network.Bugsnag.Notify`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Notify.html).+See+[`Network.Bugsnag.Notify`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Notify.html). ## Throwing & Catching
bugsnag-haskell.cabal view
@@ -1,187 +1,220 @@-cabal-version: 1.18---- This file has been generated from package.yaml by hpack version 0.33.0.------ see: https://github.com/sol/hpack------ hash: 8b4da20fb4f44bddadbceef8b9b755ecdae48843a34333ea8d2cb4032406f0b7--name: bugsnag-haskell-version: 0.0.4.1-synopsis: Bugsnag error reporter for Haskell-description: Please see README.md-category: Web-homepage: https://github.com/pbrisbin/bugsnag-haskell#readme-author: Patrick Brisbin-maintainer: pbrisbin@gmail.com-license: MIT-license-file: LICENSE-build-type: Simple-extra-source-files:- test/fixtures/index-project/Foo.hs+cabal-version: 1.18+name: bugsnag-haskell+version: 0.0.4.2+license: MIT+license-file: LICENSE+maintainer: pbrisbin@gmail.com+author: Patrick Brisbin+homepage: https://github.com/pbrisbin/bugsnag-haskell#readme+synopsis: Bugsnag error reporter for Haskell+description: Please see README.md+category: Web+build-type: Simple+extra-source-files: test/fixtures/index-project/Foo.hs extra-doc-files: CHANGELOG.md README.md flag examples- description: Build the examples- manual: False- default: False+ description: Build the examples+ default: False library- exposed-modules:- Data.Aeson.Ext- Network.Bugsnag- Network.Bugsnag.App- Network.Bugsnag.BeforeNotify- Network.Bugsnag.Breadcrumb- Network.Bugsnag.BugsnagRequestHeaders- Network.Bugsnag.CodeIndex- Network.Bugsnag.Device- Network.Bugsnag.Event- Network.Bugsnag.Exception- Network.Bugsnag.Exception.Parse- Network.Bugsnag.Notifier- Network.Bugsnag.Notify- Network.Bugsnag.ReleaseStage- Network.Bugsnag.Report- Network.Bugsnag.Reporter- Network.Bugsnag.Request- Network.Bugsnag.Session- Network.Bugsnag.Settings- Network.Bugsnag.Severity- Network.Bugsnag.StackFrame- Network.Bugsnag.Thread- Network.Bugsnag.User- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- src- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- Glob >=0.9.0- , aeson >=1.3.0.0- , base >=4.11.0 && <5- , bytestring- , case-insensitive- , containers- , http-client- , http-client-tls- , http-conduit- , http-types- , iproute- , network- , parsec- , template-haskell- , text- , th-lift-instances- , time- , ua-parser- , wai- default-language: Haskell2010+ exposed-modules:+ Data.Aeson.Ext+ Network.Bugsnag+ Network.Bugsnag.App+ Network.Bugsnag.BeforeNotify+ Network.Bugsnag.Breadcrumb+ Network.Bugsnag.BugsnagRequestHeaders+ Network.Bugsnag.CodeIndex+ Network.Bugsnag.Device+ Network.Bugsnag.Event+ Network.Bugsnag.Exception+ Network.Bugsnag.Exception.Parse+ Network.Bugsnag.Notifier+ Network.Bugsnag.Notify+ Network.Bugsnag.ReleaseStage+ Network.Bugsnag.Report+ Network.Bugsnag.Reporter+ Network.Bugsnag.Request+ Network.Bugsnag.Session+ Network.Bugsnag.Settings+ Network.Bugsnag.Severity+ Network.Bugsnag.StackFrame+ Network.Bugsnag.Thread+ Network.Bugsnag.User + hs-source-dirs: src+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies++ build-depends:+ Glob >=0.9.0,+ aeson >=1.3.0.0,+ base >=4.11.0 && <5,+ bytestring >=0.10.12.0,+ case-insensitive >=1.2.1.0,+ containers >=0.6.2.1,+ http-client >=0.6.4.1,+ http-client-tls >=0.3.5.3,+ http-conduit >=2.3.8,+ http-types >=0.12.3,+ iproute >=1.7.11,+ network >=3.1.1.1,+ parsec >=3.1.14.0,+ template-haskell >=2.16.0.0,+ text >=1.2.4.1,+ th-lift-instances >=0.1.18,+ time >=1.9.3,+ ua-parser >=0.7.6.0,+ wai >=3.2.3+ executable example-cli- main-is: Main.hs- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- examples/cli- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- base >=4.11.0 && <5- , bugsnag-haskell- if !(flag(examples))- buildable: False- default-language: Haskell2010+ main-is: Main.hs+ hs-source-dirs: examples/cli+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies + build-depends:+ base >=4.11.0 && <5,+ bugsnag-haskell -any++ if !flag(examples)+ buildable: False+ executable example-simple- main-is: Main.hs- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- examples/simple- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- base >=4.11.0 && <5- , bugsnag-haskell- if !(flag(examples))- buildable: False- default-language: Haskell2010+ main-is: Main.hs+ hs-source-dirs: examples/simple+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies + build-depends:+ base >=4.11.0 && <5,+ bugsnag-haskell -any++ if !flag(examples)+ buildable: False+ executable example-warp- main-is: Main.hs- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- examples/warp- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- base >=4.11.0 && <5- , bugsnag-haskell- , wai- , warp- if !(flag(examples))- buildable: False- default-language: Haskell2010+ main-is: Main.hs+ hs-source-dirs: examples/warp+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies + build-depends:+ base >=4.11.0 && <5,+ bugsnag-haskell -any,+ wai >=3.2.3,+ warp >=3.3.16++ if !flag(examples)+ buildable: False+ executable example-yesod- main-is: Main.hs- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- examples/yesod- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- base >=4.11.0 && <5- , bugsnag-haskell- , unliftio- , wai- , warp- , yesod-core- if !(flag(examples))- buildable: False- default-language: Haskell2010+ main-is: Main.hs+ hs-source-dirs: examples/yesod+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies + build-depends:+ base >=4.11.0 && <5,+ bugsnag-haskell -any,+ unliftio >=0.2.18,+ wai >=3.2.3,+ warp >=3.3.16,+ yesod-core >=1.6.20.1++ if !flag(examples)+ buildable: False+ test-suite doctest- type: exitcode-stdio-1.0- main-is: DocTest.hs- other-modules:- Paths_bugsnag_haskell- hs-source-dirs:- ./.- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- aeson- , base >=4.11.0 && <5- , doctest- , yaml- default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: DocTest.hs+ hs-source-dirs: ./+ other-modules: Paths_bugsnag_haskell+ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies + build-depends:+ aeson >=1.5.6.0,+ base >=4.11.0 && <5,+ doctest >=0.17,+ yaml >=0.11.5.0+ test-suite spec- type: exitcode-stdio-1.0- main-is: Spec.hs- other-modules:- Network.Bugsnag.CodeIndexSpec- Network.Bugsnag.ReportSpec- Network.BugsnagSpec- Paths_bugsnag_haskell- hs-source-dirs:- test- default-extensions: BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NoImplicitPrelude NoMonomorphismRestriction OverloadedStrings RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TypeApplications TypeFamilies- ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-import-lists -Wno-all-missed-specialisations- build-depends:- aeson- , aeson-qq- , base >=4.11.0 && <5- , bugsnag-haskell- , hspec- , text- , time- , unliftio- default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs: test+ other-modules:+ Network.Bugsnag.CodeIndexSpec+ Network.Bugsnag.ReportSpec+ Network.BugsnagSpec+ Paths_bugsnag_haskell++ default-language: Haskell2010+ default-extensions:+ BangPatterns DataKinds DeriveAnyClass DeriveFoldable DeriveFunctor+ DeriveGeneric DeriveLift DeriveTraversable DerivingStrategies+ FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving+ LambdaCase MultiParamTypeClasses NoImplicitPrelude+ NoMonomorphismRestriction OverloadedStrings RankNTypes+ RecordWildCards ScopedTypeVariables StandaloneDeriving+ TypeApplications TypeFamilies++ build-depends:+ aeson >=1.5.6.0,+ aeson-qq >=0.8.3,+ base >=4.11.0 && <5,+ bugsnag-haskell -any,+ hspec >=2.7.10,+ text >=1.2.4.1,+ time >=1.9.3,+ unliftio >=0.2.18
src/Data/Aeson/Ext.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- |@@ -5,9 +6,9 @@ -- Orphan instances and shared @'Generic'@ JSON options. -- module Data.Aeson.Ext- ( bsAesonOptions- )-where+ ( fromText+ , bsAesonOptions+ ) where import Prelude @@ -17,6 +18,14 @@ import Data.List (stripPrefix) import Data.Maybe (fromMaybe) import Data.Text.Encoding (decodeUtf8)++#if MIN_VERSION_aeson(2,0,0)+import Data.Aeson.Key (fromText)+#else+import Data.Text (Text)+fromText :: Text -> Text+fromText = id+#endif instance ToJSON ByteString where toJSON = String . decodeUtf8
src/Network/Bugsnag.hs view
@@ -12,8 +12,7 @@ -- module Network.Bugsnag ( module X- )-where+ ) where import Network.Bugsnag.App as X import Network.Bugsnag.BeforeNotify as X
src/Network/Bugsnag/App.hs view
@@ -1,8 +1,7 @@ module Network.Bugsnag.App ( BugsnagApp(..) , bugsnagApp- )-where+ ) where import Prelude
src/Network/Bugsnag/BeforeNotify.hs view
@@ -30,8 +30,7 @@ , setWarningSeverity , setErrorSeverity , setInfoSeverity- )-where+ ) where import Prelude
src/Network/Bugsnag/Breadcrumb.hs view
@@ -2,8 +2,7 @@ ( BugsnagBreadcrumbType(..) , BugsnagBreadcrumb(..) , bugsnagBreadcrumb- )-where+ ) where import Prelude
src/Network/Bugsnag/BugsnagRequestHeaders.hs view
@@ -2,12 +2,12 @@ ( BugsnagRequestHeaders , bugsnagRequestHeaders , redactBugsnagRequestHeaders- )-where+ ) where import Prelude import Data.Aeson+import Data.Aeson.Ext import Data.ByteString (ByteString) import Data.CaseInsensitive (CI) import qualified Data.CaseInsensitive as CI@@ -26,7 +26,7 @@ headerToKeyValue :: KeyValue kv => (CI ByteString, ByteString) -> kv headerToKeyValue (name, value) =- TE.decodeUtf8 (CI.original name) .= String (TE.decodeUtf8 value)+ fromText (TE.decodeUtf8 (CI.original name)) .= String (TE.decodeUtf8 value) -- | Create 'BugsnagRequestHeaders' bugsnagRequestHeaders :: RequestHeaders -> BugsnagRequestHeaders
src/Network/Bugsnag/CodeIndex.hs view
@@ -7,8 +7,7 @@ ( CodeIndex , buildCodeIndex , findSourceRange- )-where+ ) where import Prelude
src/Network/Bugsnag/Device.hs view
@@ -3,8 +3,7 @@ , BugsnagDevice(..) , bugsnagDevice , bugsnagDeviceFromWaiRequest- )-where+ ) where import Prelude
src/Network/Bugsnag/Event.hs view
@@ -1,12 +1,12 @@ module Network.Bugsnag.Event ( BugsnagEvent(..) , bugsnagEvent- )-where+ ) where import Prelude import Data.Aeson+import Data.Aeson.Ext import Data.Aeson.Types import Data.Text (Text) import Network.Bugsnag.App@@ -56,7 +56,7 @@ where -- For implementing "omit Nothing fields" (.=?) :: ToJSON v => Text -> Maybe v -> [Pair]- (.=?) k = maybe [] (pure . (k .=))+ (.=?) k = maybe [] (pure . (fromText k .=)) bugsnagEvent :: BugsnagException -> BugsnagEvent bugsnagEvent exception = BugsnagEvent
src/Network/Bugsnag/Exception.hs view
@@ -4,8 +4,7 @@ ( BugsnagException(..) , bugsnagException , bugsnagExceptionFromSomeException- )-where+ ) where import Prelude @@ -26,7 +25,7 @@ -- something better than @'SomeException'@. This is a shameless copy of the -- @'Handler'@ type (and general approach) used by @'catches'@. ---data Caster = forall e. Exception e => Caster (e -> BugsnagException)+data Caster = forall e . Exception e => Caster (e -> BugsnagException) data BugsnagException = BugsnagException { beErrorClass :: Text
src/Network/Bugsnag/Exception/Parse.hs view
@@ -6,8 +6,7 @@ ( MessageWithStackFrames(..) , parseErrorCall , parseStringException- )-where+ ) where import Prelude
src/Network/Bugsnag/Notifier.hs view
@@ -5,8 +5,7 @@ module Network.Bugsnag.Notifier ( BugsnagNotifier , bugsnagNotifier- )-where+ ) where import Prelude
src/Network/Bugsnag/Notify.hs view
@@ -1,8 +1,7 @@ module Network.Bugsnag.Notify ( notifyBugsnag , notifyBugsnagWith- )-where+ ) where import Prelude
src/Network/Bugsnag/ReleaseStage.hs view
@@ -1,7 +1,6 @@ module Network.Bugsnag.ReleaseStage ( BugsnagReleaseStage(..)- )-where+ ) where import Prelude
src/Network/Bugsnag/Report.hs view
@@ -1,8 +1,7 @@ module Network.Bugsnag.Report ( BugsnagReport(..) , bugsnagReport- )-where+ ) where import Prelude
src/Network/Bugsnag/Reporter.hs view
@@ -9,8 +9,7 @@ -- module Network.Bugsnag.Reporter ( reportError- )-where+ ) where import Prelude
src/Network/Bugsnag/Request.hs view
@@ -4,8 +4,7 @@ ( BugsnagRequest(..) , bugsnagRequest , bugsnagRequestFromWaiRequest- )-where+ ) where import Prelude
src/Network/Bugsnag/Session.hs view
@@ -8,8 +8,7 @@ module Network.Bugsnag.Session ( BugsnagSession(..) , bugsnagSession- )-where+ ) where import Prelude
src/Network/Bugsnag/Settings.hs view
@@ -8,8 +8,7 @@ , newBugsnagSettings , bugsnagSettings , bugsnagShouldNotify- )-where+ ) where import Prelude @@ -92,7 +91,6 @@ -- | Should this @'BugsnagEvent'@ trigger notification? ----- >>> :set -XOverloadedStrings -- >>> settings <- newBugsnagSettings "" -- >>> let event = bugsnagEvent $ bugsnagException "" "" [] -- >>> bugsnagShouldNotify settings event@@ -124,7 +122,6 @@ -- -- Uses @'getGlobalManager'@. ----- >>> :set -XOverloadedStrings -- >>> settings <- newBugsnagSettings "API_KEY" -- >>> bsApiKey settings -- API_KEY
src/Network/Bugsnag/Severity.hs view
@@ -4,8 +4,7 @@ , BugsnagSeverityReasonAttributes(..) , bugsnagSeverityReasonAttributes , BugsnagSeverityReasonType(..)- )-where+ ) where import Prelude
src/Network/Bugsnag/StackFrame.hs view
@@ -7,8 +7,7 @@ , BugsnagStackFrame(..) , bugsnagStackFrame , currentStackFrame- )-where+ ) where import Prelude @@ -71,11 +70,6 @@ -- | Construct a @'BugsnagStackFrame'@ from the point of this splice -- -- Unfortunately there's no way to know the function, so that must be given:------ >>> :set -XOverloadedStrings -XTemplateHaskell--- >>> :m +Control.Arrow--- >>> (bsfFile &&& bsfMethod) $ $(currentStackFrame) "myFunc"--- ("<interactive>","myFunc") -- currentStackFrame :: Q Exp currentStackFrame = [|locStackFrame $(qLocation >>= liftLoc)|]
src/Network/Bugsnag/Thread.hs view
@@ -1,8 +1,7 @@ module Network.Bugsnag.Thread ( BugsnagThread(..) , bugsnagThread- )-where+ ) where import Prelude
src/Network/Bugsnag/User.hs view
@@ -1,8 +1,7 @@ module Network.Bugsnag.User ( BugsnagUser(..) , bugsnagUser- )-where+ ) where import Prelude
test/Network/Bugsnag/CodeIndexSpec.hs view
@@ -3,8 +3,7 @@ module Network.Bugsnag.CodeIndexSpec ( spec- )-where+ ) where import Prelude
test/Network/Bugsnag/ReportSpec.hs view
@@ -2,8 +2,7 @@ module Network.Bugsnag.ReportSpec ( spec- )-where+ ) where import Prelude
test/Network/BugsnagSpec.hs view
@@ -2,8 +2,7 @@ module Network.BugsnagSpec ( spec- )-where+ ) where import Prelude @@ -51,8 +50,11 @@ let frame = head $ beStacktrace ex bsfFile frame `shouldBe` "test/Network/BugsnagSpec.hs"- bsfLineNumber frame `shouldBe` 19- bsfColumnNumber frame `shouldBe` Just 8+ bsfLineNumber frame `shouldBe` 18+ -- different versions of GHC disagree, apparently, if the column is+ -- the opening of the splice (7) or the first character into the+ -- splice (8)+ --bsfColumnNumber frame `shouldBe` Just 8 bsfMethod frame `shouldBe` "brokenFunctionIO" bsfInProject frame `shouldBe` Just True @@ -67,7 +69,7 @@ let frame = head $ beStacktrace ex bsfFile frame `shouldBe` "test/Network/BugsnagSpec.hs"- bsfLineNumber frame `shouldBe` 26+ bsfLineNumber frame `shouldBe` 25 bsfColumnNumber frame `shouldBe` Just 15 bsfMethod frame `shouldBe` "error" @@ -84,7 +86,7 @@ let frame = head $ beStacktrace ex bsfFile frame `shouldBe` "test/Network/BugsnagSpec.hs"- bsfLineNumber frame `shouldBe` 33+ bsfLineNumber frame `shouldBe` 32 bsfColumnNumber frame `shouldBe` Just 16 bsfMethod frame `shouldBe` "throwString" @@ -102,7 +104,7 @@ let frame = head $ beStacktrace ex bsfFile frame `shouldBe` "test/Network/BugsnagSpec.hs"- bsfLineNumber frame `shouldBe` 40+ bsfLineNumber frame `shouldBe` 39 bsfColumnNumber frame `shouldBe` Just 17 bsfMethod frame `shouldBe` "throwString"