Catch name_mapper exceptions
Aperta
Crash
Effort: easy
- Lingua principale
- Rust
- Stelle
- 22.3k
- Fork
- 1.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
You can write name mappers like
module.name_mapper='foo\(bar\)?' -> '\1'
which will error since the matching group might not exist. This leads to an uncaught exception. This should be easy to fix - we should wrap the `Str.global_replace` calls in https://github.com/facebook/flow/blob/master/src/services/inference/module_js.ml with `try/with` blocks, emit an error, and soldier on.
Thanks @billschaller for the report!
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.