Skip to content

Commit 0e31c7c

Browse files
committed
docs: update or add description to errors
1 parent e5d62bf commit 0e31c7c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

gokart/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ def __exit__(self, exception_type, exception_value, traceback):
3939

4040

4141
class GokartBuildError(Exception):
42+
"""Raised when ``gokart.build`` failed. This exception contains raised exceptions in the task execution."""
43+
4244
def __init__(self, messsage, raised_exceptions: dict[str, list[Exception]]):
4345
super().__init__(messsage)
4446
self.raised_exceptions = raised_exceptions
4547

4648

4749
class HasLockedTaskException(Exception):
48-
pass
50+
"""Raised when the task failed to acquire the lock in the task execution."""
4951

5052

5153
class TaskLockExceptionRaisedFlag:

gokart/pandas_type_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class PandasTypeError(Exception):
14-
pass
14+
"""Raised when the type of the pandas DataFrame column is not as expected."""
1515

1616

1717
class PandasTypeConfig(luigi.Config):

gokart/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
# NOTE: inherited from AssertionError for backward compatibility (Formerly, Gokart raises that exception when a task dumps an empty DataFrame).
4242
class EmptyDumpError(AssertionError):
43-
"""Attempted to dump an empty DataFrame even though it is prohibited (fail_on_empty_dump is set to True)."""
43+
"""Raised when the task attempts to dump an empty DataFrame even though it is prohibited (``fail_on_empty_dump`` is set to True)"""
4444

4545

4646
class TaskOnKart(luigi.Task, Generic[T]):

0 commit comments

Comments
 (0)