Print error prefix only if exception message present