raise 語句: 拋出異常

//例1:
begin
  raise Exception.Create('拋出異常');
end;


//例2:
begin
  raise Exception.CreateFmt('%s %d', ['錯誤代碼:', 999]);
end;


//例3:
var
  exc: Exception;
begin
  exc := Exception.Create('發現異常');
  raise exc;
end;
posted on 2008-03-27 23:26  萬一  閱讀( 9828)  評論( 2編輯  收藏
相關文章
相關標籤/搜索