Class ModuleDetectionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
dev.jcputney.elearning.parser.exception.ModuleException
dev.jcputney.elearning.parser.exception.ModuleDetectionException
- All Implemented Interfaces:
Serializable
Exception thrown when a module type cannot be detected or when there's an error during the module
detection process.
This exception is typically thrown by
ModuleTypeDetector implementations when they're unable
to determine the type of an eLearning module (SCORM 1.2, SCORM 2004, AICC, cmi5) based on the
module's structure and manifest files.
Common scenarios that might cause this exception include:
- Missing or invalid manifest files
- Corrupt module package
- Unsupported module type
- I/O errors when accessing module files
Applications should catch this exception and provide appropriate feedback to users about the invalid or unsupported module.
This exception extends ModuleException and inherits its ability to store
additional context information as metadata.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModuleDetectionException(String message) Constructs a new ModuleDetectionException with the specified detail message.ModuleDetectionException(String message, Throwable cause) Constructs a new ModuleDetectionException with the specified detail message and cause.Constructs a new ModuleDetectionException 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
-
ModuleDetectionException
Constructs a new ModuleDetectionException with the specified detail message.- Parameters:
message- the detail message (which is saved for later retrieval by theThrowable.getMessage()method)
-
ModuleDetectionException
Constructs a new ModuleDetectionException 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.
-
ModuleDetectionException
Constructs a new ModuleDetectionException 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
-