Recover creates an Option to set the recover flag to b. When set to true, this causes the parser to recover from panics and convert it to an error. Setting it to false can be useful while debugging to access the full stack trace. The default is true.
(b bool)
| 24486 | // |
| 24487 | // The default is true. |
| 24488 | func Recover(b bool) Option { |
| 24489 | return func(p *parser) Option { |
| 24490 | old := p.recover |
| 24491 | p.recover = b |
| 24492 | return Recover(old) |
| 24493 | } |
| 24494 | } |
| 24495 | |
| 24496 | // GlobalStore creates an Option to set a key to a certain value in |
| 24497 | // the globalStore. |