Regexp control on raised errors