diff options
| author | 2022-01-07 17:12:42 +0000 | |
|---|---|---|
| committer | 2022-01-07 17:16:50 +0000 | |
| commit | 52cc8a418307ae7a551d23e6bd2d367b544e7bf9 (patch) | |
| tree | 9fff020964190f33174e78ff6201381be577d0b3 /src/modules/m_showfile.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Refactor CoreException and ModuleException.
Diffstat (limited to 'src/modules/m_showfile.cpp')
| -rw-r--r-- | src/modules/m_showfile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 3de8df9d3..cb952e127 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -108,13 +108,13 @@ class ModuleShowFile final { std::string cmdname = tag->getString("name"); if (cmdname.empty()) - throw ModuleException("Empty value for 'name'"); + throw ModuleException(this, "Empty value for 'name'"); std::transform(cmdname.begin(), cmdname.end(), cmdname.begin(), ::toupper); const std::string file = tag->getString("file", cmdname); if (file.empty()) - throw ModuleException("Empty value for 'file'"); + throw ModuleException(this, "Empty value for 'file'"); FileReader reader(file); CommandShowFile* sfcmd; @@ -123,12 +123,12 @@ class ModuleShowFile final { // Command exists, check if it is ours if (handler->creator != this) - throw ModuleException("Command " + cmdname + " already exists"); + throw ModuleException(this, "Command " + cmdname + " already exists"); // This is our command, make sure we don't have the same entry twice sfcmd = static_cast<CommandShowFile*>(handler); if (stdalgo::isin(newcmds, sfcmd)) - throw ModuleException("Command " + cmdname + " is already used in a <showfile> tag"); + throw ModuleException(this, "Command " + cmdname + " is already used in a <showfile> tag"); } else { |
