diff --git a/examples/hwapi/button_reaction.py b/examples/hwapi/button_reaction.py
index 5e1890d5aacf88b80bcefd6b3cb498f40ea1e58c..b72e813e4c6d2e67eee45409704659334c429297 100644
--- a/examples/hwapi/button_reaction.py
+++ b/examples/hwapi/button_reaction.py
@@ -11,9 +11,9 @@ Ready? Cliiiiick!
 """)
 
 while 1:
-    try:
-        delay = machine.time_pulse_us(BUTTON, 1, 10*1000*1000)
-        print("You are as slow as %d microseconds!" % delay)
-    except OSError:
+    delay = machine.time_pulse_us(BUTTON, 1, 10*1000*1000)
+    if delay < 0:
         print("Well, you're *really* slow")
+    else:
+        print("You are as slow as %d microseconds!" % delay)
     utime.sleep_ms(10)