-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#747 Truncation handling of FBStatisticsManager
- Loading branch information
1 parent
e132550
commit 8d5a962
Showing
6 changed files
with
199 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ gen/ | |
build_*.bat | ||
.idea/ | ||
build-local.properties | ||
local-test-logging.properties | ||
classes/ | ||
*.iml | ||
*.eml | ||
|
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
51 changes: 51 additions & 0 deletions
51
src/main/org/firebirdsql/gds/ng/InfoTruncatedException.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,51 @@ | ||
/* | ||
* Firebird Open Source JDBC Driver | ||
* | ||
* Distributable under LGPL license. | ||
* You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* LGPL License for more details. | ||
* | ||
* This file was created by members of the firebird development team. | ||
* All individual contributions remain the Copyright (C) of those | ||
* individuals. Contributors to this file are either listed here or | ||
* can be obtained from a source control history command. | ||
* | ||
* All rights reserved. | ||
*/ | ||
package org.firebirdsql.gds.ng; | ||
|
||
import java.sql.SQLNonTransientException; | ||
|
||
/** | ||
* Thrown to indicate that an info request buffer was truncated ({@code isc_info_truncated}). | ||
* <p> | ||
* Implementations of {@link InfoProcessor} may throw this exception if they cannot recover themselves from truncation. | ||
* The length of the truncated buffer is reported in {@link #length()}; this is the <em>actual</em> length, not the | ||
* <em>requested</em> length. | ||
* </p> | ||
* <p> | ||
* This is a subclass of {@link SQLNonTransientException} as retrying the operation without taking corrective action | ||
* will likely result in the same error. | ||
* </p> | ||
* | ||
* @author Mark Rotteveel | ||
* @since 5.0.2 | ||
*/ | ||
public class InfoTruncatedException extends SQLNonTransientException { | ||
|
||
private final int length; | ||
|
||
public InfoTruncatedException(String message, int length) { | ||
super(message); | ||
this.length = length; | ||
} | ||
|
||
public final int length() { | ||
return length; | ||
} | ||
|
||
} |
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
Oops, something went wrong.