Line data Source code
1 : part of 'main.dart'; 2 : 3 : /// This exception is raised when a user tries to navigate to a path which is unspecified 4 : class UnknownUrlVError extends Error { 5 : final String url; 6 : 7 1 : UnknownUrlVError({required this.url}); 8 : 9 1 : @override 10 2 : String toString() => "The url '$url' has no matching route.\n" 11 : "Consider using VRoute(path: '.*', widget: UnknownPathWidget()) at the bottom of your VRouter routes to catch any wrong route."; 12 : 13 0 : @override 14 0 : StackTrace? get stackTrace => StackTrace.current; 15 : } 16 : 17 : /// This exception is raised when a user tries to navigate to a path which is unspecified 18 : class InvalidPushVError extends Error { 19 : final String url; 20 : 21 1 : InvalidPushVError({required this.url}); 22 : 23 1 : @override 24 1 : String toString() => 25 1 : "The current url is null but you are trying to access the path \"$url\" which does not start with '/'.\n" 26 : "This is likely because you set a initialUrl which does not start with '/'."; 27 : 28 0 : @override 29 0 : StackTrace? get stackTrace => StackTrace.current; 30 : }