exception-logger.ts 359 B

1234567891011
  1. import { Extension } from '@codemirror/state'
  2. import { EditorView } from '@codemirror/view'
  3. import { captureException } from '../../../infrastructure/error-reporter'
  4. export const exceptionLogger = (): Extension => {
  5. return EditorView.exceptionSink.of(exception => {
  6. captureException(exception, {
  7. tags: { handler: 'cm6-exception' },
  8. })
  9. })
  10. }