Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
e971f64f
Commit
e971f64f
authored
Mar 28, 2014
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch all exception produced by a received message (irc or xmpp)
parent
44b72b74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+7
-1
src/xmpp/xmpp_parser.cpp
src/xmpp/xmpp_parser.cpp
+7
-1
No files found.
src/irc/irc_client.cpp
View file @
e971f64f
...
...
@@ -93,7 +93,13 @@ void IrcClient::parse_in_buffer(const size_t)
this
->
in_buf
=
this
->
in_buf
.
substr
(
pos
+
2
,
std
::
string
::
npos
);
auto
cb
=
irc_callbacks
.
find
(
message
.
command
);
if
(
cb
!=
irc_callbacks
.
end
())
(
this
->*
(
cb
->
second
))(
message
);
{
try
{
(
this
->*
(
cb
->
second
))(
message
);
}
catch
(
const
std
::
exception
&
e
)
{
log_error
(
"Unhandled exception: "
<<
e
.
what
());
}
}
else
log_info
(
"No handler for command "
<<
message
.
command
);
}
...
...
src/xmpp/xmpp_parser.cpp
View file @
e971f64f
...
...
@@ -131,7 +131,13 @@ void XmppParser::char_data(const XML_Char* data, int len)
void
XmppParser
::
stanza_event
(
const
Stanza
&
stanza
)
const
{
for
(
const
auto
&
callback
:
this
->
stanza_callbacks
)
callback
(
stanza
);
{
try
{
callback
(
stanza
);
}
catch
(
const
std
::
exception
&
e
)
{
log_debug
(
"Unhandled exception: "
<<
e
.
what
());
}
}
}
void
XmppParser
::
stream_open_event
(
const
XmlNode
&
node
)
const
...
...
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