InitializationException constructor

InitializationException({
  1. required String component,
  2. String? userMessage,
  3. String? devMessage,
  4. Object? cause,
  5. StackTrace? stack,
  6. Map<String, dynamic> metadata = const {},
  7. bool isReportable = true,
})

Creates an initialization exception scoped to a specific component.

Implementation

InitializationException({
  required String component,
  String? userMessage,
  String? devMessage,
  super.cause,
  super.stack,
  Map<String, dynamic> metadata = const {},
  super.isReportable,
}) : super(
        userMessage:
            userMessage ?? 'Failed to initialize the application component.',
        devMessage: devMessage ?? 'Initialization failed for: $component',
        severity: Severity.critical,
        metadata: {
          'component': component,
          ...metadata,
        },
      );