class_docstr: Thrown if a command call fails.
  
  Note: Subclasses should override `to_str` rather than `__str__` because
  `to_str` is called directly in datalad.cli.main.
class_docstr_tok: ["Thrown","if","a","command","call","fails",".","Note",":","Subclasses","should","override","`","to_str","`","rather","than","`","__str__","`","because","`","to_str","`","is","called","directly","in","datalad.cli.main","."]
code: def __str__(self) -> str:
      return self.to_str()
  
file_path: datalad/datalad/runner/exception.py
imports: from __future__ import annotations
  import logging
  import os
  from collections import Counter
  from typing import Any, Optional
label_desc: Use image node_id 3 for calling the CommandError obj's underlying member method code with example usage: obj.__str__() and returns: self