[examples] update the error-handling example using the new error handle way