DartLoadingException constructor
DartLoadingException(
- String message
Exception thrown when Dart file loading fails.
This exception is thrown during the loading or parsing of Dart files when an error occurs, such as:
- Invalid Dart syntax
- Missing or incorrect import statements
- File not found or unreadable
Typically used in reflection-based systems or runtime file loading processes like those in the JetLeaf framework.
Example
void loadDartFile(String path) {
if (!File(path).existsSync()) {
throw DartLoadingException('File not found: $path');
}
// ...parse or load logic
}
Implementation
DartLoadingException(super.message);