floitsch 07/22/2023 11:41 AMYeah. This is a bit annoying.
Typically, we try to provide better error messages, but here the error message comes from the underlying C code (the primitive). And the errors that can come from there are a bit limited.
We can't easily test for the pin numbers in Toit code already, as the pins are different depending on the Target (esp32, esp32c3, ...), and we don't want to change the Toit code for every possible hardware. This means that it's currently just an OUT_OF_RANGE...