Don't throw from API class.

s/throw/return, which the author obviously intended to write.

Change-Id: I3093352adecd6e1d7bda52c89d02c57e7dac3b58
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>