Class ModuleParsingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
dev.jcputney.elearning.parser.exception.ModuleException
dev.jcputney.elearning.parser.exception.ModuleParsingException
- All Implemented Interfaces:
Serializable
Exception thrown when there's an error parsing an eLearning module.
This exception is typically thrown by ModuleParser
implementations when they encounter errors while parsing module content. It is a higher-level
exception that may wrap more specific exceptions like ManifestParseException.
Common scenarios that might cause this exception include:
- Missing or invalid manifest files
- Missing required metadata elements
- Invalid module structure
- I/O errors when accessing module files
Applications should catch this exception and provide appropriate feedback to users about the invalid or problematic module.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModuleParsingException(String contextMessage, ValidationResult result) Constructs a new ModuleParsingException with validation result. -
Method Summary
Modifier and TypeMethodDescriptionGets the validation result containing all issues found during parsing.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ModuleParsingException
Constructs a new ModuleParsingException with validation result. This constructor should only be called from ValidationResult.toException().- Parameters:
contextMessage- Context describing what was being parsedresult- ValidationResult containing all validation issues
-
-
Method Details
-
getValidationResult
Gets the validation result containing all issues found during parsing.- Returns:
- ValidationResult with errors and warnings
-