Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fltrail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fides
fltrail
Commits
bc003f9b
Commit
bc003f9b
authored
6 years ago
by
Ludwig Weihmann
Browse files
Options
Downloads
Patches
Plain Diff
feat: added more verbose debugging messages to VereinfachtesResultSet
parent
3cd1e194
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gemeinsamforschen/src/main/java/unipotsdam/gf/core/database/mysql/VereinfachtesResultSet.java
+39
-15
39 additions, 15 deletions
...otsdam/gf/core/database/mysql/VereinfachtesResultSet.java
with
39 additions
and
15 deletions
gemeinsamforschen/src/main/java/unipotsdam/gf/core/database/mysql/VereinfachtesResultSet.java
+
39
−
15
View file @
bc003f9b
...
...
@@ -11,6 +11,30 @@ public class VereinfachtesResultSet {
private
ResultSet
resultSet
;
/**
* creates a more verbose error message that actually tells you whats wrong
* @param columnLabel
* @return
*/
private
String
errorMessage
(
String
columnLabel
){
return
String
.
format
(
"error in VereinfachtesResultSet: Spalte %s konnte nicht gefunden werden"
,
columnLabel
);
}
/**
* creates a more verbose error message that actually tells you whats wrong
* @param columnIndex
* @return
*/
private
String
errorMessage
(
int
columnIndex
){
return
String
.
format
(
"error in VereinfachtesResultSet: Zeile %d konnte nicht gefunden werden"
,
columnIndex
);
}
public
VereinfachtesResultSet
(
ResultSet
resultset
)
{
if
(
resultset
==
null
)
{
throw
new
Error
(
"kein Resultset"
);
...
...
@@ -34,7 +58,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
public
float
getFloat
(
int
columnIndex
)
{
...
...
@@ -43,7 +67,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
public
double
getDouble
(
int
columnIndex
)
{
...
...
@@ -52,7 +76,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
...
...
@@ -62,7 +86,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
...
...
@@ -72,7 +96,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
public
Timestamp
getTimestamp
(
String
columnLabel
)
{
...
...
@@ -81,7 +105,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
...
...
@@ -91,7 +115,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
boolean
getBoolean
(
String
columnLabel
)
{
...
...
@@ -100,7 +124,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
int
getInt
(
String
columnLabel
)
{
...
...
@@ -109,7 +133,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
long
getLong
(
String
columnLabel
)
{
...
...
@@ -118,7 +142,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
float
getFloat
(
String
columnLabel
)
{
...
...
@@ -127,7 +151,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
double
getDouble
(
String
columnLabel
)
{
...
...
@@ -136,7 +160,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
ResultSetMetaData
getMetaData
()
{
...
...
@@ -154,7 +178,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnIndex
)
);
}
public
Object
getObject
(
String
columnLabel
)
{
...
...
@@ -163,7 +187,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
int
findColumn
(
String
columnLabel
)
{
...
...
@@ -172,7 +196,7 @@ public class VereinfachtesResultSet {
}
catch
(
SQLException
ex
)
{
System
.
err
.
println
(
ex
.
getMessage
());
}
throw
new
Error
(
"
error
in VereinfachtesResultSet"
);
throw
new
Error
(
error
Message
(
columnLabel
)
);
}
public
boolean
isBeforeFirst
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment