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_websocket.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Refactor CoreException and ModuleException.
Diffstat (limited to 'src/modules/m_websocket.cpp')
| -rw-r--r-- | src/modules/m_websocket.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 0df7e0818..139abd59d 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -594,7 +594,7 @@ class ModuleWebSocket final { auto tags = ServerInstance->Config->ConfTags("wsorigin"); if (tags.empty()) - throw ModuleException("You have loaded the websocket module but not configured any allowed origins!"); + throw ModuleException(this, "You have loaded the websocket module but not configured any allowed origins!"); WebSocketConfig config; for (const auto& [_, tag] : tags) @@ -602,7 +602,7 @@ class ModuleWebSocket final // Ensure that we have the <wsorigin:allow> parameter. const std::string allow = tag->getString("allow"); if (allow.empty()) - throw ModuleException("<wsorigin:allow> is a mandatory field, at " + tag->source.str()); + throw ModuleException(this, "<wsorigin:allow> is a mandatory field, at " + tag->source.str()); config.allowedorigins.push_back(allow); } @@ -617,7 +617,7 @@ class ModuleWebSocket final else if (stdalgo::string::equalsci(defaultmodestr, "text")) config.defaultmode = WebSocketConfig::DM_TEXT; else - throw ModuleException(defaultmodestr + " is an invalid value for <websocket:defaultmode>; acceptable values are 'binary', 'text' and 'reject', at " + tag->source.str()); + throw ModuleException(this, defaultmodestr + " is an invalid value for <websocket:defaultmode>; acceptable values are 'binary', 'text' and 'reject', at " + tag->source.str()); irc::spacesepstream proxyranges(tag->getString("proxyranges")); for (std::string proxyrange; proxyranges.GetToken(proxyrange); ) |
