On Mon, Jan 27, 2020 at 3:23 PM Eric Raymond <e...@thyrsus.com> wrote: > Consider a parser in which your handler function for a given token or subtree > consists of a bunch of if/then returns, and not matching one of them means > you should throw upwards to an error handler.
FWIW, https://github.com/google/wuffs/blob/db87fa6bd18de9de563f3bb352eaabee3616916a/lang/parse/parse.go#L290 is such a parser, written in Go, that just returns an error instead of trying to twist panic/recover into throw/catch. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOeFMNWJL%3DNpNcCX%3DxcDU8Fcjx8TUs8ukUhxE0mkyJpTaEtanw%40mail.gmail.com.