What exceptions can conversion functions raise?
Posted: Mon Jan 04, 2016 2:21 pm
According to Ayuto's announcement, it's only ValueError:
But I found the following try-except statements in players/weapons/__init__.py:
Looking at C++ code, there's no explicit OverflowError, too. Only ValueError.
Question is, where does OverflowError come from? Should I always be ready to catch it?
If the conversion failed, a ValueError will be raised.
But I found the following try-except statements in players/weapons/__init__.py:
Syntax: Select all
try:
index = index_from_inthandle(handle)
except (ValueError, OverflowError):
continue
Looking at C++ code, there's no explicit OverflowError, too. Only ValueError.
Question is, where does OverflowError come from? Should I always be ready to catch it?