errors.py
Custom exceptions used by Copier.
ConfigFileError
¶
Bases: ValueError, CopierError
Parent class defining problems with the config file.
Source code in copier/errors.py
27 28 | |
CopierAnswersInterrupt
¶
Bases: CopierError, KeyboardInterrupt
CopierAnswersInterrupt is raised during interactive question prompts.
It typically follows a KeyboardInterrupt (i.e. ctrl-c) and provides an opportunity for the caller to conduct additional cleanup, such as writing the partially completed answers to a file.
Attributes:
| Name | Type | Description |
|---|---|---|
answers |
AnswersMap that contains the partially completed answers object. |
|
last_question |
Question representing the last_question that was asked at the time the interrupt was raised. |
|
template |
Template that was being processed for answers. |
Source code in copier/errors.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
CopierError
¶
Bases: Exception
Base class for all other Copier errors.
Source code in copier/errors.py
15 16 | |
CopierWarning
¶
Bases: Warning
Base class for all other Copier warnings.
Source code in copier/errors.py
116 117 | |
DirtyLocalWarning
¶
Bases: UserWarning, CopierWarning
Changes and untracked files present in template.
Source code in copier/errors.py
128 129 | |
ExtensionNotFoundError
¶
Bases: UserMessageError
Extensions listed in the configuration could not be loaded.
Source code in copier/errors.py
71 72 | |
InvalidConfigFileError
¶
Bases: ConfigFileError
Indicates that the config file is wrong.
Source code in copier/errors.py
31 32 33 34 35 36 37 | |
InvalidTypeError
¶
Bases: TypeError, CopierError
The question type is not among the supported ones.
Source code in copier/errors.py
49 50 | |
MultipleConfigFilesError
¶
Bases: ConfigFileError
Both copier.yml and copier.yaml found, and that's an error.
Source code in copier/errors.py
40 41 42 43 44 45 46 | |
OldTemplateWarning
¶
Bases: UserWarning, CopierWarning
Template was designed for an older Copier version.
Source code in copier/errors.py
124 125 | |
PathError
¶
Bases: CopierError, ValueError
The path is invalid in the given context.
Source code in copier/errors.py
53 54 | |
PathNotAbsoluteError
¶
Bases: PathError
The path is not absolute, but it should be.
Source code in copier/errors.py
57 58 59 60 61 | |
PathNotRelativeError
¶
Bases: PathError
The path is not relative, but it should be.
Source code in copier/errors.py
64 65 66 67 68 | |
ShallowCloneWarning
¶
Bases: UserWarning, CopierWarning
The template repository is a shallow clone.
Source code in copier/errors.py
132 133 | |
UnknownCopierVersionWarning
¶
Bases: UserWarning, CopierWarning
Cannot determine installed Copier version.
Source code in copier/errors.py
120 121 | |
UnsafeTemplateError
¶
Bases: CopierError
Unsafe Copier template features are used without explicit consent.
Source code in copier/errors.py
103 104 105 106 107 108 109 110 111 112 | |
UnsupportedVersionError
¶
Bases: UserMessageError
Copier version does not support template version.
Source code in copier/errors.py
23 24 | |
UserMessageError
¶
Bases: CopierError
Exit the program giving a message to the user.
Source code in copier/errors.py
19 20 | |