diff options
author | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:23:46 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:52:09 +0800 |
commit | 94f8330613877b3582d32bd11abd83a97b4399ad (patch) | |
tree | 5359de314be1ebde17f8d1e48632a97d18f9e50f /src/3rdParty/efsw/Log.cpp | |
parent | 60f8f00a022ac08701792b2897b72d8c99b50f52 (diff) | |
download | yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.gz yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.bz2 yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.zip |
adding -w option to Yuescript tool.
Diffstat (limited to 'src/3rdParty/efsw/Log.cpp')
-rwxr-xr-x | src/3rdParty/efsw/Log.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/Log.cpp b/src/3rdParty/efsw/Log.cpp new file mode 100755 index 0000000..ddf7a62 --- /dev/null +++ b/src/3rdParty/efsw/Log.cpp | |||
@@ -0,0 +1,34 @@ | |||
1 | #include <efsw/efsw.hpp> | ||
2 | |||
3 | namespace efsw { namespace Errors { | ||
4 | |||
5 | static std::string LastError; | ||
6 | |||
7 | std::string Log::getLastErrorLog() { | ||
8 | return LastError; | ||
9 | } | ||
10 | |||
11 | Error Log::createLastError( Error err, std::string log ) { | ||
12 | switch ( err ) { | ||
13 | case FileNotFound: | ||
14 | LastError = "File not found ( " + log + " )"; | ||
15 | break; | ||
16 | case FileRepeated: | ||
17 | LastError = "File reapeated in watches ( " + log + " )"; | ||
18 | break; | ||
19 | case FileOutOfScope: | ||
20 | LastError = "Symlink file out of scope ( " + log + " )"; | ||
21 | break; | ||
22 | case FileRemote: | ||
23 | LastError = | ||
24 | "File is located in a remote file system, use a generic watcher. ( " + log + " )"; | ||
25 | break; | ||
26 | case Unspecified: | ||
27 | default: | ||
28 | LastError = log; | ||
29 | } | ||
30 | |||
31 | return err; | ||
32 | } | ||
33 | |||
34 | }} // namespace efsw::Errors | ||