7ff5042c1e
Changed to use typed error instead of formatted string. Added tests for new public method. Signed-off-by: Kenny Leung <kleung@google.com>