Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
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
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
windbot
Commits
e8a03931
Commit
e8a03931
authored
Nov 21, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update error output, make it more significant
parent
e6491a91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
Logger.cs
Logger.cs
+3
-0
Program.cs
Program.cs
+8
-2
No files found.
Logger.cs
View file @
e8a03931
...
@@ -16,7 +16,10 @@ namespace WindBot
...
@@ -16,7 +16,10 @@ namespace WindBot
}
}
public
static
void
WriteErrorLine
(
string
message
)
public
static
void
WriteErrorLine
(
string
message
)
{
{
Console
.
BackgroundColor
=
ConsoleColor
.
Red
;
Console
.
ForegroundColor
=
ConsoleColor
.
White
;
Console
.
Error
.
WriteLine
(
"["
+
DateTime
.
Now
.
ToString
(
"yy-MM-dd HH:mm:ss"
)
+
"] "
+
message
);
Console
.
Error
.
WriteLine
(
"["
+
DateTime
.
Now
.
ToString
(
"yy-MM-dd HH:mm:ss"
)
+
"] "
+
message
);
Console
.
ResetColor
();
}
}
}
}
}
}
\ No newline at end of file
Program.cs
View file @
e8a03931
...
@@ -36,7 +36,7 @@ namespace WindBot
...
@@ -36,7 +36,7 @@ namespace WindBot
// Join the host specified on the command line.
// Join the host specified on the command line.
if
(
args
.
Length
==
0
)
if
(
args
.
Length
==
0
)
{
{
Logger
.
WriteLine
(
"=== WARN ==="
);
Logger
.
Write
Error
Line
(
"=== WARN ==="
);
Logger
.
WriteLine
(
"No input found, tring to connect to localhost YGOPro host."
);
Logger
.
WriteLine
(
"No input found, tring to connect to localhost YGOPro host."
);
Logger
.
WriteLine
(
"If it fail, the program will quit sliently."
);
Logger
.
WriteLine
(
"If it fail, the program will quit sliently."
);
}
}
...
@@ -53,7 +53,13 @@ namespace WindBot
...
@@ -53,7 +53,13 @@ namespace WindBot
// In case windbot is placed in a folder under ygopro folder
// In case windbot is placed in a folder under ygopro folder
absolutePath
=
Path
.
GetFullPath
(
"../"
+
databasePath
);
absolutePath
=
Path
.
GetFullPath
(
"../"
+
databasePath
);
if
(!
File
.
Exists
(
absolutePath
))
if
(!
File
.
Exists
(
absolutePath
))
Logger
.
WriteErrorLine
(
"Can't find cards database file. Please place cards.cdb next to WindBot.exe ."
);
{
Logger
.
WriteErrorLine
(
"Can't find cards database file."
);
Logger
.
WriteErrorLine
(
"Please place cards.cdb next to WindBot.exe or Bot.exe ."
);
Logger
.
WriteLine
(
"Press any key to quit..."
);
Console
.
ReadKey
();
System
.
Environment
.
Exit
(
1
);
}
NamedCardsManager
.
Init
(
absolutePath
);
NamedCardsManager
.
Init
(
absolutePath
);
}
}
...
...
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