Pash-Project/Pash — pull request #163 by mrward (2013-10-13 19:05:12+00:00)
Title: Implement trap statement

trap { 'trapped' }
trap { continue }
trap { break }
trap { $_.Exception.Message }
trap [System.FormatException] { }

Break and continue as child statements inside the trap body currently do not work, for example:

trap {
if {$continueOnError) {
continue
}
}

$_ is not currently written to the error stream since that does not seem to be output to the host.