-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use dedicated exception for Location validation (#11367)
Fixes #11302
- Loading branch information
Denis
committed
Jul 8, 2021
1 parent
7e89dfe
commit 6a63c04
Showing
5 changed files
with
96 additions
and
23 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
flow-server/src/main/java/com/vaadin/flow/router/InvalidLocationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2000-2021 Vaadin Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.vaadin.flow.router; | ||
|
||
/** | ||
* Thrown to indicate that a {@link Location} instance is invalid. | ||
* | ||
* @author Vaadin Ltd | ||
* @since | ||
* | ||
* @see Location | ||
*/ | ||
public class InvalidLocationException extends RuntimeException { | ||
|
||
/** | ||
* Creates a new exception with the specified detail message. | ||
* | ||
* @param message | ||
* the detail message. The detail message is saved for later | ||
* retrieval by the {@link #getMessage()} method. | ||
*/ | ||
public InvalidLocationException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructs a new runtime exception with the specified detail message and | ||
* cause. | ||
* | ||
* @param message | ||
* the detail message (which is saved for later retrieval by the | ||
* {@link #getMessage()} method). | ||
* @param cause | ||
* the cause (which is saved for later retrieval by the | ||
* {@link #getCause()} method). (A <tt>null</tt> value is | ||
* permitted, and indicates that the cause is nonexistent or | ||
* unknown.) | ||
*/ | ||
public InvalidLocationException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters