Posting to the bus should always be "safe" for the caller
This commit is contained in:
1 parent
3c44f0746b
commit
063df2cbea
1 file changed
+7
-1
@@ -1,4 +1,5 @@
|
||||
using bts.api;
|
||||
using mbts;
|
||||
using mbts.utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -27,7 +28,12 @@ namespace bts.core
|
||||
}
|
||||
|
||||
public void post<T>(ITag<T> tag, T data) {
|
||||
subject<T>(tag).OnNext(data);
|
||||
try {
|
||||
subject<T>(tag).OnNext(data);
|
||||
}
|
||||
catch(Exception e) {
|
||||
Logger.error(log.Subsystem.Ui, $"Exception posting to '{tag}': {e}");
|
||||
}
|
||||
}
|
||||
|
||||
public IObservable<T> subscribe<T>(ITag<T> tag) {
|
||||
|
||||
Reference in new issue
Block a user