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