-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error message when a file can not be found by ReviewBoard
#130 - Can not show diff and create review request
- Loading branch information
Showing
5 changed files
with
40 additions
and
2 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
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
21 changes: 21 additions & 0 deletions
21
...re/src/org/review_board/ereviewboard/core/exception/ReviewboardFileNotFoundException.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,21 @@ | ||
package org.review_board.ereviewboard.core.exception; | ||
|
||
import org.review_board.ereviewboard.core.client.ErrorCode; | ||
|
||
/** | ||
* The <tt>ReviewboardFileNotFoundException</tt> signals that a file that was | ||
* referenced in an API call was not found | ||
* | ||
*/ | ||
public class ReviewboardFileNotFoundException extends ReviewboardApiException { | ||
|
||
public ReviewboardFileNotFoundException() { | ||
|
||
} | ||
|
||
public ReviewboardFileNotFoundException(String fileName, String revision) { | ||
super("No file named '" + fileName + "' found in the repository at revision '" + revision | ||
+ "'", ErrorCode.FILE_NOT_FOUND.getErrorCode()); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
org.review_board.ereviewboard.tests/testdata/jsondata/file-not-found.json
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 @@ | ||
{"stat": "fail", "err": {"msg": "The file was not found in the repository", "code": 207}, "file": "/simple-project/w/runtime-ereviewboard/simple-project/src/com/example/Logic.java", "revision": "1"} |