39 lines
917 B
Plaintext
39 lines
917 B
Plaintext
unit ErrorUnit;
|
|
{-------------------------------------------------------------------------------
|
|
Error management unit
|
|
---------------------
|
|
reSource v2.6
|
|
Copyright (C) 1998-2001 Victor Kasenda / gruv
|
|
http://go.to/gruv
|
|
email: vickas@singnet.com.sg
|
|
|
|
|
|
Desc:
|
|
Used for debugging and showing of error messages quickly.
|
|
-------------------------------------------------------------------------------}
|
|
|
|
|
|
(**) interface (**)
|
|
uses
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|
StdCtrls;
|
|
|
|
{Displays a messagebox with the error description s}
|
|
procedure ShowError(const s: string);
|
|
procedure ShowFatal(const s: string);
|
|
|
|
(**) implementation (**)
|
|
|
|
procedure ShowError(const s: string);
|
|
begin
|
|
Application.MessageBox(PChar(s), 'Error', 0);
|
|
end;
|
|
|
|
procedure ShowFatal(const s: string);
|
|
begin
|
|
Application.MessageBox(PChar(s), 'Fatal', 0);
|
|
halt(1);
|
|
end;
|
|
|
|
end.
|