1"""
2
3
4"""
5from __future__ import annotations
6
7# Import:
8from typing import Final
9from jgdv.debugging import TraceBuilder
10from jgdv._abstract.error import JGDVError
11
12##--| Error Messages
13MissingSectionName : Final[str] = "{cls} has no section {key}"
14MissingSectionIndex : Final[str] = "{cls} has no section {idx}, only {sections}"
15SliceMisMatch : Final[str] = "Mismatch between section slices and word slices"
16UnkownSlice : Final[str] = "Slice Logic Failed"
17IndexOfEmptyStr : Final[str] = "Tried to Index the empty str"
18MalformedData : Final[str] = "Base data malformed"
19TooManyUUIDs : Final[str] = "More than One UUID found"
20NoUUIDToDiff : Final[str] = "Tried to diff a uuid with a non-uniq strang"
21StrangCtorFailure : Final[str] = "[{cls}] Stage: {stage}"
22CodeRefImportFailed : Final[str] = "Attempted import failed, attribute not found"
23CodeRefImportNotCallable : Final[str] = "Imported 'Function' was not a callable"
24CodeRefImportNotClass : Final[str] = "Imported 'Class' was not a type"
25CodeRefImportCheckFail : Final[str] = "Imported Value does not match required type"
26CodeRefImportUnknownFail : Final[str] = "Imported Code Reference is not of correct type"
27CodeRefImportNotValue : Final[str] = "Imported Code Reference is not a value"
28CodeRefUUIDFail : Final[str] = "Code References shouldn't need UUIDs"
29
30FormatterExpansionTypeFail : Final[str] = "Unrecognized expansion type"
31FormatterConversionUnknownSpec : Final[str] = "Unknown conversion specifier {spec!s}"
32FormatterUnkownBodyType : Final[str] = "Unknown body type"
33
34NoSkipMark : Final[str] = "Can't push without a skip mark in the last section"
35
36
37##--| Error Classes
[docs]
38class StrangError(JGDVError):
39 """ The Base Error type that Strang's raise """
40 pass