Closed ForNeVeR closed 8 years ago
Finally terms aren't considered when building the parse tree in AstBuilder.cs:425.
And this is also why Pash is crashing: Parsing technically works, but there is a real bug when building the parse tree as it assumes that all terms following the try
are catch
clauses which is obviously wrong.
Currently Pash can only recover from problems in parsing and execution. Building the parse tree is an intermediate step where Pash doesn't provide error recovery, yet.
I will resolve this bug and add support for finally clauses :)
As reported at our maillist, we have some problems with
finally
clause.I got an exception with the following example:
We also have an inconsistency with PowerShell when returning the values from the
finally
clause. For example, the following will return a list with two values in PowerShell:But in Pash it returns only 4 and not 0. We should check the spec again and ultimately fix that inconsistency.