NavigationException constructor
NavigationException({})
Creates a navigation exception, capturing the failed operation and route.
Implementation
NavigationException({
required this.route,
required this.operation,
this.arguments,
String? userMessage,
String? devMessage,
super.cause,
super.stack,
Map<String, dynamic> metadata = const {},
super.severity = Severity.warning,
super.isReportable = false,
}) : super(
userMessage: userMessage ?? 'Navigation failed.',
devMessage: devMessage ?? 'Navigation failed: $operation to $route',
metadata: {
'route': route,
'operation': operation,
if (arguments != null) 'arguments': arguments,
...metadata,
},
);