try
    Screen('OpenWindow', 0);
    WaitSecs(10);
    Screen('CloseAll');
catch
    Screen('CloseAll')
    rethrow(lasterror)
end