-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Neo Core] Part 1. Isolate Plugins Exceptions from the Node. #3309
Changes from all commits
3c02309
e426ed6
5d6fa28
439f504
e569fed
d701dd3
db1c7f0
17f74ef
6d06a53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,7 +229,15 @@ protected internal virtual void OnSystemLoaded(NeoSystem system) | |
/// <returns><see langword="true"/> if the <paramref name="message"/> is handled by a plugin; otherwise, <see langword="false"/>.</returns> | ||
public static bool SendMessage(object message) | ||
{ | ||
return Plugins.Any(plugin => plugin.OnMessage(message)); | ||
try | ||
{ | ||
return Plugins.Any(plugin => plugin.OnMessage(message)); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Utility.Log(nameof(Plugin), LogLevel.Error, ex); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem I see is that if you have a plugin that uses states, and it fails, you can have a corrupted chain and still work There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, #3311 solve that problem |
||
return false; | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this when? it's only used for plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, need to check plugin exceptions seperately.