Skip to content

Commit dfb1e94

Browse files
committed
Add missing docs
1 parent d604447 commit dfb1e94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dispatch/proto.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def __init__(
294294
status: categorization of the error.
295295
type: arbitrary string, used for humans. Optional.
296296
message: arbitrary message. Optional.
297+
value: arbitrary exception from which the error is derived. Optional.
297298
298299
Raises:
299300
ValueError: Neither type or message was provided or status is
@@ -324,6 +325,7 @@ def from_exception(cls, ex: Exception, status: Status | None = None) -> Error:
324325
return Error(status, ex.__class__.__qualname__, str(ex), ex)
325326

326327
def to_exception(self) -> Exception:
328+
"""Returns an equivalent exception."""
327329
if self.value is not None:
328330
return self.value
329331

0 commit comments

Comments
 (0)