Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
ImgGen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ImgGen
Commits
898a4b5c
Commit
898a4b5c
authored
Apr 29, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update exception handling
parent
874ea094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
DataManager.cs
DataManager.cs
+7
-0
No files found.
DataManager.cs
View file @
898a4b5c
...
@@ -182,6 +182,7 @@ namespace ImgGen
...
@@ -182,6 +182,7 @@ namespace ImgGen
data
.
attribute
=
(
Attribute
)
reader
.
GetInt32
(
9
);
data
.
attribute
=
(
Attribute
)
reader
.
GetInt32
(
9
);
}
}
reader
.
Close
();
reader
.
Close
();
reader
=
null
;
// for Exception -> finally GC
command
.
CommandText
=
$"SELECT * FROM texts WHERE id=
{
code
}
"
;
command
.
CommandText
=
$"SELECT * FROM texts WHERE id=
{
code
}
"
;
reader
=
command
.
ExecuteReader
();
reader
=
command
.
ExecuteReader
();
...
@@ -196,6 +197,9 @@ namespace ImgGen
...
@@ -196,6 +197,9 @@ namespace ImgGen
return
DrawCard
(
data
,
text
);
return
DrawCard
(
data
,
text
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
#if DEBUG
when
(
false
)
#endif
{
{
Console
.
WriteLine
(
$"Error when parsing
{
code
}
-
{
e
}
"
);
Console
.
WriteLine
(
$"Error when parsing
{
code
}
-
{
e
}
"
);
return
null
;
return
null
;
...
@@ -246,6 +250,9 @@ namespace ImgGen
...
@@ -246,6 +250,9 @@ namespace ImgGen
image
=
new
Bitmap
(
filename
);
image
=
new
Bitmap
(
filename
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
#if DEBUG
when
(
false
)
#endif
{
{
Console
.
WriteLine
(
$"Error when parsing
{
data
.
code
}
-
{
e
}
"
);
Console
.
WriteLine
(
$"Error when parsing
{
data
.
code
}
-
{
e
}
"
);
return
;
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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