[wat] Capture and output error message