This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from maxmind/greg/api-clean-up
Improve handling of invalid databases
- Loading branch information
Showing
5 changed files
with
267 additions
and
371 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/maxmind/geoip/InvalidDatabaseException.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,26 @@ | ||
package com.maxmind.geoip; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Signals that there was an issue reading from the database file due to | ||
* unexpected data formatting. This generally suggests that the database is | ||
* corrupt or otherwise not in a format supported by the reader. | ||
*/ | ||
public final class InvalidDatabaseException extends RuntimeException { | ||
|
||
/** | ||
* @param message A message describing the reason why the exception was thrown. | ||
*/ | ||
public InvalidDatabaseException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* @param message A message describing the reason why the exception was thrown. | ||
* @param cause The cause of the exception. | ||
*/ | ||
public InvalidDatabaseException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
Oops, something went wrong.