p</code> is a failure, then it fails with error message <code>err_msg</code>. Often used as a last choice in <code>&lt;|&gt;</code>, e.g. <code>a &lt;|&gt; b &lt;|&gt; c &lt;?&gt; &quot;expected a b c&quot;</code>.</p><p>Examples</p><pre><code>module P = Reparse.String
open P

;;
let p = P.char 'h' &lt;|&gt; P.char 'w' in
let err_msg = &quot;[error]&quot; in
let p = p &lt;?&gt; err_msg in
let v =
  try
    let _ = P.parse_string p &quot;&quot; in
    false
  with
  | P.Parser
      { offset = 0
      ; line