pub trait ExpressionThrowTypeProvider: Provider {
// Required method
fn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
expression: &Expression<'_>,
) -> HashSet<Atom>;
}Expand description
Provider for getting thrown exception class names from any expression.
This is the most general form of throw type provider, allowing plugins to specify exceptions for any expression type (property access, array access, etc.).
Required Methods§
Sourcefn get_thrown_exceptions(
&self,
context: &ProviderContext<'_, '_, '_>,
expression: &Expression<'_>,
) -> HashSet<Atom>
fn get_thrown_exceptions( &self, context: &ProviderContext<'_, '_, '_>, expression: &Expression<'_>, ) -> HashSet<Atom>
Get the exception class names that an expression can throw.
Returns a set of fully qualified exception class names. Returns an empty set if the expression doesn’t throw.