Fix regression from previous linux commit

Fix my previous change, that introduced regression, as throw_exception was
invoked unconditionally.

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>