I know that discriminated unions still don't exist in .NET, but since we are already returning a CompileOutcome object, it would be easy to extend that object to include the error information and then consumers of the library don't have to add additional exception handling to deal with control flow issues. Plus, with the update to return the error information (including line number and column info) from the Typst library, we could now create a more meaningful error list (we could even parse it to provide a TypstError object that has line and column info.
I know that discriminated unions still don't exist in .NET, but since we are already returning a
CompileOutcomeobject, it would be easy to extend that object to include the error information and then consumers of the library don't have to add additional exception handling to deal with control flow issues. Plus, with the update to return the error information (including line number and column info) from the Typst library, we could now create a more meaningful error list (we could even parse it to provide aTypstErrorobject that has line and column info.