Skip to content

Commit

Permalink
refactor(viewer.js): Add errorinterceptor argument to propagate error…
Browse files Browse the repository at this point in the history
… to the top level app (#85)

* add-error-interceptor

* Apply suggestions from code review

Co-authored-by: Markus D. Herrmann <hackermd@users.noreply.github.com>

* Update documentation comments and add Error variables

* add custom error class

* fix linting errors

* dummy commit to trigger actions workflow

* update file name

* Update PR

* Update PR: Update signature

* Lint

* Revert "fix: Setup the dynamic import so it is separate from other packages (#113)"

This reverts commit 2834944.

* Fix enum

* Revert "Revert "fix: Setup the dynamic import so it is separate from other packages (#113)""

This reverts commit f5abca9.

---------

Co-authored-by: Markus D. Herrmann <hackermd@users.noreply.github.com>
Co-authored-by: Igor Octaviano <igoroctaviano@gmail.com>
  • Loading branch information
3 people authored May 9, 2024
1 parent 45a2ff8 commit a78dc00
Show file tree
Hide file tree
Showing 2 changed files with 264 additions and 68 deletions.
15 changes: 15 additions & 0 deletions src/customError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const errorTypes = {
VISUALIZATION: 'Visualization',
ENCODINGANDDECODING: 'EncodingDecoding'
}

class CustomError extends Error {
constructor (type, message) {
super()
this.message = message
this.stack = new Error().stack
this.type = type
}
}

export { errorTypes, CustomError }
Loading

0 comments on commit a78dc00

Please sign in to comment.