I have some trouble for choosing the right type of exception to throw when an expected custom attribute is not found (I would prefer one of the existing .NET exceptions).
What do you recommend in this case? Thanks in advance.
Edit:
Here his the context:
[<ExpectedAttribute()>]
let foo args ... = ...
The function foo
(which is user-defined) is passed to a runtime engine. The runtime have to throw an exception if the custom attribute is not present.