bugsnag-haskell 0.0.2.1 → 0.0.2.2
raw patch · 4 files changed
+111/−4 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Network.Bugsnag.Exception: instance GHC.Exception.Exception Network.Bugsnag.Exception.BugsnagException
+ Network.Bugsnag.Exception: instance GHC.Exception.Type.Exception Network.Bugsnag.Exception.BugsnagException
- Network.Bugsnag.Settings: BugsnagSettings :: BugsnagApiKey -> Maybe Text -> BugsnagReleaseStage -> [BugsnagReleaseStage] -> BeforeNotify -> BugsnagException -> Bool -> Manager -> Maybe CodeIndex -> BugsnagSettings
+ Network.Bugsnag.Settings: BugsnagSettings :: BugsnagApiKey -> Maybe Text -> BugsnagReleaseStage -> [BugsnagReleaseStage] -> BeforeNotify -> (BugsnagException -> Bool) -> Manager -> Maybe CodeIndex -> BugsnagSettings
Files
- CHANGELOG.md +33/−0
- README.md +60/−0
- bugsnag-haskell.cabal +10/−4
- test/fixtures/index-project/Foo.hs +8/−0
+ CHANGELOG.md view
@@ -0,0 +1,33 @@+## [*Unreleased*](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.2.1...master)++None++## [v0.0.2.1](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.2.0...v0.0.2.1)++- Set StackFrame as in-project based on the `CodeIndex` when present+- Correctly parse `throwString` exceptions with newlines in the message++## [v0.0.2.0](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.1.3...v0.0.2.0)++- Add `CodeIndex` support++ Adds a Template Haskell function to read your project source into an in-memory+ Map structure to be set on your `BugsnagSettings` value. Then, as part of+ notification, we can attach lines of source context to the StackFrames we+ have. NOTE: This has memory-footprint implications, so is entirely opt-in.++ See https://github.com/pbrisbin/bugsnag-haskell/pull/39++## [v0.0.1.3](https://github.com/pbrisbin/bugsnag-haskell/compare/v0.0.1.2...v0.0.1.3)++- Redact sensitive request headers by default [#31](https://github.com/pbrisbin/bugsnag-haskell/issues/31)+- Deprecate Settings that should be `BeforeNotify` values [#32](https://github.com/pbrisbin/bugsnag-haskell/issues/32)+- `bugsnagShouldNotify` operates after any `BeforeNotify` changes++## [v0.0.1.2](https://github.com/pbrisbin/bugsnag-haskell/tree/v0.0.1.2)++- Make App Version an opaque `Text`, not a structured `Version` ([@MaxGabriel](https://github.com/pbrisbin/bugsnag-haskell/pull/29))++## [v0.0.1.1](https://github.com/pbrisbin/bugsnag-haskell/tree/v0.0.1.1)++First (pre-) released version.
+ README.md view
@@ -0,0 +1,60 @@+# Bugsnag error reporter for Haskell++Catch and report exceptions in your Haskell code.++## Configuration++```hs+settings <- newBugsnagSettings "BUGSNAG_API_KEY"+```++See [`Network.Bugsnag.Settings`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Settings.html).++## Reporting an Error++```hs+notifyBugsnag settings $ toException+ $ bugsnagException "Error" "message"+ [ $(currentStackFrame) "myFunction"+ ]+```++See [`Network.Bugsnag.Notify`](http://hackage.haskell.org/package/bugsnag-haskell/docs/Network-Bugsnag-Notify.html).++## Throwing & Catching++Throw a `BugsnagException` yourself:++```hs+throw+ $ bugsnagException "Error" "message" [$(currentStackFrame) "myFunction"]+```++Catch any exceptions, notify, and re-throw it:++```hs+myFunction `catch` \ex -> do+ notifyBugsnag settings ex+ throw ex+```++## Examples++- [Simple](./examples/simple/Main.hs)+- [Command-Line](./examples/cli/Main.hs)+- [WAI/Warp](./examples/warp/Main.hs)+- [Yesod](./examples/yesod/Main.hs)++Examples can be built locally with:++```console+stack build --flag bugsnag-haskell:examples+```++## Contributing++See [CONTRIBUTING](./CONTRIBUTING.md).++---++[CHANGELOG](./CHANGELOG.md) | [LICENSE](./LICENSE)
bugsnag-haskell.cabal view
@@ -1,11 +1,13 @@--- This file has been generated from package.yaml by hpack version 0.28.2.+cabal-version: 1.18++-- This file has been generated from package.yaml by hpack version 0.31.0. -- -- see: https://github.com/sol/hpack ----- hash: caca4031fa35eb1fc2f6253201cfaafa49ed608ffdad9f181af64bc9fed36e8e+-- hash: 9d3efcbebe43626f478362471399c56726138a8e3f993f6bb61dbad0a69bc61e name: bugsnag-haskell-version: 0.0.2.1+version: 0.0.2.2 synopsis: Bugsnag error reporter for Haskell description: Please see README.md category: Web@@ -15,7 +17,11 @@ license: MIT license-file: LICENSE build-type: Simple-cabal-version: >= 1.10+extra-source-files:+ test/fixtures/index-project/Foo.hs+extra-doc-files:+ CHANGELOG.md+ README.md flag examples description: Build the examples
+ test/fixtures/index-project/Foo.hs view
@@ -0,0 +1,8 @@+module Foo where++data What = What+ deriving Show++what :: Int -> Maybe What+what 0 = Just What+what _ = Nothing