diff --git a/examples/sym-exp-complexity.py b/examples/sym-exp-complexity.py
index bc88cdf0c95a88a152745262b674cb4bb18d8ae5..9dfbfb442e8ccc8e38a88e2cf4c020df752fa5c9 100644
--- a/examples/sym-exp-complexity.py
+++ b/examples/sym-exp-complexity.py
@@ -81,6 +81,8 @@ def plot_flops():
         orders = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         flops = [45, 194, 474, 931, 1650, 2632, 3925, 5591, 7706, 10272]
         filename = "helmholtz-m2l-complexity-2d.pdf"
+    else:
+        raise ValueError()
 
     if USE_MATPLOTLIB:
         plt.rc("font", size=16)