Add line error catch support

Signed-off-by: Richard Lea <chigix@zoho.com>