Exception raised when there is a compile error. It can be a parse, semantic analysis, type check or other compilation-related error. CompileErrors raised from an errors object carry all of the messages that have not been reported out by error streaming. This is patched up by bu
| 1285 | |
| 1286 | |
| 1287 | class CompileError(Exception): |
| 1288 | """Exception raised when there is a compile error. |
| 1289 | |
| 1290 | It can be a parse, semantic analysis, type check or other |
| 1291 | compilation-related error. |
| 1292 | |
| 1293 | CompileErrors raised from an errors object carry all of the |
| 1294 | messages that have not been reported out by error streaming. |
| 1295 | This is patched up by build.build to contain either all error |
| 1296 | messages (if errors were streamed) or none (if they were not). |
| 1297 | |
| 1298 | """ |
| 1299 | |
| 1300 | messages: list[str] |
| 1301 | use_stdout = False |
| 1302 | # Can be set in case there was a module with a blocking error |
| 1303 | module_with_blocker: str | None = None |
| 1304 | |
| 1305 | def __init__( |
| 1306 | self, messages: list[str], use_stdout: bool = False, module_with_blocker: str | None = None |
| 1307 | ) -> None: |
| 1308 | super().__init__("\n".join(messages)) |
| 1309 | self.messages = messages |
| 1310 | self.use_stdout = use_stdout |
| 1311 | self.module_with_blocker = module_with_blocker |
| 1312 | |
| 1313 | |
| 1314 | def remove_path_prefix(path: str, prefix: str | None) -> str: |
no outgoing calls
searching dependent graphs…