Do not leak exceptions from the Profile class.

This is public API.

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