bugzid:12180 removed tabs from code, changed exception handling to use n...

...ew style, wrapped print in parens