-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: new InvalidCommandArgumentsException and using it in CreateDat…
…averseFeaturedItemCommand
- Loading branch information
Showing
3 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
...a/edu/harvard/iq/dataverse/engine/command/exception/InvalidCommandArgumentsException.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,25 @@ | ||
package edu.harvard.iq.dataverse.engine.command.exception; | ||
|
||
import edu.harvard.iq.dataverse.engine.command.Command; | ||
|
||
/** | ||
* Exception thrown when a {@link Command} is executed with invalid or malformed arguments. | ||
* <p> | ||
* This exception typically indicates that the input parameters provided to the command | ||
* do not meet the required criteria (e.g., missing fields, invalid formats, or other | ||
* constraints). | ||
* </p> | ||
* <p> | ||
* Example scenarios: | ||
* <ul> | ||
* <li>A required argument is null or missing.</li> | ||
* <li>An argument is in an invalid format (e.g., a malformed email address).</li> | ||
* <li>Arguments violate business rules or constraints.</li> | ||
* </ul> | ||
*/ | ||
public class InvalidCommandArgumentsException extends CommandException { | ||
|
||
public InvalidCommandArgumentsException(String message, Command aCommand) { | ||
super(message, aCommand); | ||
} | ||
} |
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