Skip to content

Commit

Permalink
Disable failed SMS probe on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewGerber committed Jan 16, 2019
1 parent c83b3ec commit f283b17
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,16 @@ private SmsDatum GetMostRecentMMS()
}
catch (Exception ex)
{
SensusServiceHelper.Get().Logger.Log("Exception while getting MMS: " + ex.Message, LoggingLevel.Normal, GetType());
string message = "Exception while getting MMS: " + ex.Message;

// throw back to caller
throw ex;
SensusServiceHelper.Get().Logger.Log(message, LoggingLevel.Normal, GetType());

// throw a NotSupportedException, as our implementation is probably not correct -- and
// will never work for -- this device. this message will cause the probe to be disabled
// if thrown on protocol startup; otherwise, it will simply be ignored. one reason this
// is important is that sensus will continue to foreground the app in an attempt to get
// the probe started. but it will always fail, and this will really irritate the user.
throw new NotSupportedException(message, ex);
}
finally
{
Expand Down

0 comments on commit f283b17

Please sign in to comment.