Deprecated message api now accepts a $throwexception param that if set to true always throws an exception