| 129 | return oldvalue |
| 130 | |
| 131 | def __init__(self, *args, **kargs) -> None: |
| 132 | |
| 133 | super().__init__(*args) |
| 134 | |
| 135 | self._h5bt_policy = kargs.get("h5bt", self.DEFAULT_H5_BACKTRACE_POLICY) |
| 136 | |
| 137 | if self._h5bt_policy and self._dump_h5_backtrace is not None: |
| 138 | self.h5backtrace = self._dump_h5_backtrace() |
| 139 | """HDF5 back trace. |
| 140 | |
| 141 | Contains the HDF5 back trace as a (possibly empty) list of |
| 142 | tuples. Each tuple has the following format:: |
| 143 | |
| 144 | (filename, line number, function name, text) |
| 145 | |
| 146 | Depending on the value of the *h5bt* parameter passed to the |
| 147 | initializer the h5backtrace attribute can be set to None. |
| 148 | This means that the HDF5 back trace has been simply ignored |
| 149 | (not retrieved from the HDF5 C library error stack) or that |
| 150 | there has been an error (silently ignored) during the HDF5 back |
| 151 | trace retrieval. |
| 152 | |
| 153 | .. versionadded:: 2.4 |
| 154 | |
| 155 | See Also |
| 156 | -------- |
| 157 | traceback.format_list : :func:`traceback.format_list` |
| 158 | |
| 159 | """ |
| 160 | |
| 161 | # XXX: check _dump_h5_backtrace failures |
| 162 | else: |
| 163 | self.h5backtrace = None |
| 164 | |
| 165 | def __str__(self) -> str: |
| 166 | """Return a sting representation of the exception. |