Changed exception handling to display error rather than re-throwing it.