+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
 """PWMOut Class for NXP LPC4330"""
 
 from greatfet import GreatFET
 try:
     from microcontroller.pin import pwmOuts
 except ImportError:
-    raise RuntimeError("No PWM outputs defined for this board")
+    raise RuntimeError("No PWM outputs defined for this board") from ImportError
+
 
 # pylint: disable=unnecessary-pass
 class PWMError(IOError):