Skip to content

Commit

Permalink
enhance(errors): improve error message clarity and specificity
Browse files Browse the repository at this point in the history
- Enhanced error messages for missing functions, classes, and attributes to provide more actionable feedback.
- Refined descriptions for class methods, instance attributes, and superclasses.
- Focused on user-friendly and detailed messaging to streamline debugging and validation processes.
  • Loading branch information
atellaluca committed Nov 20, 2024
1 parent d9b5866 commit 5a1ca6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/importspy/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class Errors:
ENV_VAR_MISSING = "Missing environment variable: '{0}'. Ensure it is defined in the system."
VAR_MISMATCH = "Value mismatch for variable '{0}': expected '{1}', found '{2}'"
VAR_MISSING = "Missing variable: '{0}'. Ensure it is defined."
GENERIC_FUNCTIONS_MISMATCH = "Functions mismatch: Some functions are not defined."
CLASS_MISSING = "Missing class: {0} Ensure it is defined."
GENERIC_CLASS_ATTRIBUTES_MISMATCH = "Class attributes mismatch in Class {0}: some attributes are not defined in the class {0}."
GENERIC_INSTANCE_ATTRIBUTES_MISMATCH = "Instance attributes mismatch in Class {0}: some attributes are not defined in the __init__ method of the class {0}."
GENERIC_CLASS_METHODS_MISMATCH = "Methods mismatch in Class {0}: some attributes are not defined in the class {0}."
GENERIC_CLASS_SUPERCLASSES_MISMATCH = "Superclass mismatch in Class: {0} some superclasses are not defined in the class {0}."
FUNCTIONS_MISSING = "Missing function: '{0}'. Ensure it is defined."
CLASS_MISSING = "Missing class: {0}. Ensure it is defined."
CLASS_ATTRIBUTE_MISSING = "Missing class attribute: '{0}'. Ensure it is defined in class '{1}'."
CLASS_INSTANCE_ATTRIBUTE_MISSING = "Missing class instance attribute: '{0}'. Ensure it is defined in class '{1}'."
CLASS_METHOD_MISSING = "Missing class method: '{0}'. Ensure it is defined in class '{1}'."
CLASS_SUPERCLASS_MISSING = "Missing class superclass: '{0}'. Make sure that '{1}' extends {0}."

0 comments on commit 5a1ca6a

Please sign in to comment.