結果 : check if function throws error javascript