diff options
Diffstat (limited to 'crates/shirabe/src/util/silencer.rs')
| -rw-r--r-- | crates/shirabe/src/util/silencer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/shirabe/src/util/silencer.rs b/crates/shirabe/src/util/silencer.rs index 7286689a..e2b2ac9e 100644 --- a/crates/shirabe/src/util/silencer.rs +++ b/crates/shirabe/src/util/silencer.rs @@ -35,6 +35,11 @@ impl Silencer { } } + /// Wrap a callable only when it can reach the PHP runtime, where a plugin may emit diagnostics + /// of its own; the same holds for a region bracketed by `suppress` and `restore`. Work that + /// stays inside Rust has no `error_reporting()` level to lower and emits no diagnostic on + /// failure, and errors it raises propagate either way, so silencing it is indistinguishable + /// from running it unguarded. Run it unguarded instead. pub fn call<F, T>(callable: F) -> anyhow::Result<T> where F: FnOnce() -> anyhow::Result<T>, |
