diff --git a/Implab/AbstractPromise.cs b/Implab/AbstractPromise.cs --- a/Implab/AbstractPromise.cs +++ b/Implab/AbstractPromise.cs @@ -27,10 +27,8 @@ namespace Implab { if ((m_mask & PromiseEventType.Success) != 0 && m_handler != null) { try { m_handler(); - } catch (Exception err) { - // avoid calling handler twice in case of error - if (m_error != null) - SignalError(err); + // Analysis disable once EmptyGeneralCatchClause + } catch { } } } @@ -55,8 +53,8 @@ namespace Implab { if (m_cancel != null) { try { m_cancel(reason); - } catch (Exception err) { - SignalError(err); + // Analysis disable once EmptyGeneralCatchClause + } catch { } } else if ( (m_mask & PromiseEventType.Cancelled) != 0 && m_handler != null) { try { diff --git a/Implab/AbstractPromiseT.cs b/Implab/AbstractPromiseT.cs --- a/Implab/AbstractPromiseT.cs +++ b/Implab/AbstractPromiseT.cs @@ -39,16 +39,14 @@ namespace Implab { if (m_success != null) { try { m_success(result); - } catch(Exception err) { - SignalError(err); + // Analysis disable once EmptyGeneralCatchClause + } catch { } } else if ((m_mask & PromiseEventType.Success) != 0 && m_handler != null) { try { m_handler(); - } catch(Exception err) { - // avoid calling handler twice in case of error - if (m_error != null) - SignalError(err); + // Analysis disable once EmptyGeneralCatchClause + } catch { } } } @@ -73,8 +71,8 @@ namespace Implab { if (m_cancel != null) { try { m_cancel(reason); - } catch (Exception err) { - SignalError(err); + // Analysis disable once EmptyGeneralCatchClause + } catch { } } else if ((m_mask & PromiseEventType.Cancelled) != 0 && m_handler != null) { try {