mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 20:02:40 +02:00
44 lines
1.1 KiB
ObjectPascal
44 lines
1.1 KiB
ObjectPascal
{
|
|
This file is part of the Free Pascal test suite.
|
|
Copyright (c) 1999-2004 by the Free Pascal development team.
|
|
|
|
Used to avoid getting pop up windows for critical errors under Windows
|
|
and OS/2 operating systems (extension of win32err unit by Pierre Muller).
|
|
|
|
See the file COPYING.FPC, included in this distribution,
|
|
for details about the copyright.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
**********************************************************************}
|
|
|
|
unit popuperr;
|
|
|
|
interface
|
|
|
|
implementation
|
|
|
|
{$ifdef win32}
|
|
uses
|
|
windows;
|
|
{$endif win32}
|
|
|
|
{$IFDEF OS2}
|
|
function _DosError (Error: longint): longint; cdecl;
|
|
external 'DOSCALLS' index 212;
|
|
{$ENDIF OS2}
|
|
|
|
begin
|
|
{$ifdef win32}
|
|
SetErrorMode(
|
|
SEM_FAILCRITICALERRORS or
|
|
SEM_NOGPFAULTERRORBOX or
|
|
SEM_NOOPENFILEERRORBOX);
|
|
{$endif win32}
|
|
{$IFDEF OS2}
|
|
if os_Mode = osOS2 then _DosError (0);
|
|
{$ENDIF OS2}
|
|
end.
|