mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
12 lines
359 B
TypeScript
12 lines
359 B
TypeScript
|
import { Extension } from '@codemirror/state'
|
||
|
import { EditorView } from '@codemirror/view'
|
||
|
import { captureException } from '../../../infrastructure/error-reporter'
|
||
|
|
||
|
export const exceptionLogger = (): Extension => {
|
||
|
return EditorView.exceptionSink.of(exception => {
|
||
|
captureException(exception, {
|
||
|
tags: { handler: 'cm6-exception' },
|
||
|
})
|
||
|
})
|
||
|
}
|