[Microbit-Python] List of error codes and their meanings

Damien George damien.p.george at gmail.com
Tue Dec 20 18:31:52 EST 2016


There are many exceptions and they can occur for many reasons.  Almost
all are based on CPython and the exceptions form a hierarchy.  Eg,
indexing a list with an out-of-bounds index will raise IndexError,
which derives from LookupError, which derives from Exception, which
derives from BaseException.

For a list of implemented exceptions in MicroPython see
https://github.com/bbcmicrobit/micropython/blob/master/source/py/objexcept.c#L192-L280

On 21 December 2016 at 08:35, David Whale <david at thinkingbinaries.com> wrote:
> Is there anything in the docs that lists all the errors (exceptions) that
> can occur in MicroPython and what they mean?
>
> The closest I found was this:
>
> https://github.com/bbcmicrobit/micropython/blob/a20fbe82c919cea9519ce5a1140103f518b51caa/inc/py/qstrdefs.h
>
>
> Thanks
>
> David
>
> microbit.org-ticket: 460
>
>
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>


More information about the Microbit mailing list