added in exception handling and multiline vs single support

Signed-off-by: buckie <wjmartino@gmail.com>