Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
6e9e9f7d
Commit
6e9e9f7d
authored
Feb 05, 2026
by
Luna Riegel
Browse files
Refactor: Rework error logging
parent
bc94ffc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/EmbeddedDatabaseHandler.java
View file @
6e9e9f7d
...
@@ -265,6 +265,7 @@ public class EmbeddedDatabaseHandler {
...
@@ -265,6 +265,7 @@ public class EmbeddedDatabaseHandler {
Array
array
=
con
.
createArrayOf
(
"VARCHAR(255)"
,
idStrings
);
Array
array
=
con
.
createArrayOf
(
"VARCHAR(255)"
,
idStrings
);
ps
.
setArray
(
1
,
array
);
ps
.
setArray
(
1
,
array
);
ResultSet
rs
=
ps
.
executeQuery
();
ResultSet
rs
=
ps
.
executeQuery
();
boolean
encounteredError
=
false
;
Map
<
GmlId
,
CityObject
>
objects
=
new
HashMap
<>();
Map
<
GmlId
,
CityObject
>
objects
=
new
HashMap
<>();
while
(
rs
.
next
())
{
while
(
rs
.
next
())
{
try
(
InputStream
is
=
rs
.
getBinaryStream
(
"data"
))
{
try
(
InputStream
is
=
rs
.
getBinaryStream
(
"data"
))
{
...
@@ -278,11 +279,13 @@ public class EmbeddedDatabaseHandler {
...
@@ -278,11 +279,13 @@ public class EmbeddedDatabaseHandler {
});
});
objects
.
put
(
co
.
getGmlId
(),
co
);
objects
.
put
(
co
.
getGmlId
(),
co
);
}
catch
(
InvalidClassException
|
ClassCastException
|
SerializationException
e
){
}
catch
(
InvalidClassException
|
ClassCastException
|
SerializationException
e
){
//TODO: change this log to reflect ids map
//Cant get the id of the failed Feature, as the deserialization didn't work.
String
msg
=
String
.
format
(
"Deserialization of CityObject \"%s\" failed"
,
ids
);
encounteredError
=
true
;
logger
.
error
(
msg
,
e
);
}
}
}
}
if
(
encounteredError
){
logger
.
error
(
"Deserialization of one or more Features failed"
);
}
return
objects
;
return
objects
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
EmbeddedDatabaseHandlerException
(
e
);
throw
new
EmbeddedDatabaseHandlerException
(
e
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment