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.
This exception extends ModuleException and inherits its ability to store
additional context information as metadata.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModuleParsingException(String message) Constructs a new ModuleParsingException with the specified detail message.ModuleParsingException(String message, Throwable cause) Constructs a new ModuleParsingException with the specified detail message and cause.Constructs a new ModuleParsingException with the specified detail message, cause, and metadata. -
Method Summary
Methods inherited from class dev.jcputney.elearning.parser.exception.ModuleException
addMetadata, getMetadata, getMetadata, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ModuleParsingException
Constructs a new ModuleParsingException with the specified detail message.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method)
-
ModuleParsingException
Constructs a new ModuleParsingException with the specified detail message and cause.Note that the detail message associated with
causeis not automatically incorporated into this exception's detail message.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method)cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). A null value is permitted, and indicates that the cause is nonexistent or unknown.
-
ModuleParsingException
Constructs a new ModuleParsingException with the specified detail message, cause, and metadata.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method)cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). A null value is permitted, and indicates that the cause is nonexistent or unknown.metadata- a map of additional context information about the exception
-