<li><strong>Also catches subclasses of the exception.</strong></li>
<li><strong>Also catches subclasses of the exception.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'traceback.print_exc()'</span></code> to print the error message to stderr.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'traceback.print_exc()'</span></code> to print the error message to stderr.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'print(<name>, file=sys.stderr)'</span></code> to print just the cause of the exception.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'print(<name>)'</span></code> to print just the cause of the exception (its arguments).</strong></li>