Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Normale Exceptions nicht anzueigen (https://www.delphipraxis.net/98886-normale-exceptions-nicht-anzueigen.html)

FAlter 6. Sep 2007 18:51

Re: Normale Exceptions nicht anzueigen
 
Hi,

hab mal bei meinem TurboDelphi nachgesehen.

Delphi-Quellcode:
{$IFDEF PC_MAPPED_EXCEPTIONS}
const
  UW_EXC_CLASS_BORLANDCPP = $FBEE0001;
  UW_EXC_CLASS_BORLANDDELPHI = $FBEE0101;

type
  // The following _Unwind_* types represent unwind.h
  _Unwind_Word = LongWord;
  _Unwind_Exception_Cleanup_Fn = Pointer;
  _Unwind_Exception = packed record
    exception_class: _Unwind_Word;
    exception_cleanup: _Unwind_Exception_Cleanup_Fn;
    private_1: _Unwind_Word;
    private_2: _Unwind_Word;
  end;

  PRaisedException = ^TRaisedException;
  TRaisedException = packed record
    RefCount: Integer;
    ExceptObject: TObject;
    ExceptionAddr: Pointer;
    HandlerEBP: LongWord;
    Flags: LongWord;
    Cleanup: Pointer;
    Prev: PRaisedException;
    ReleaseProc: Pointer;
  end;
{$ELSE}
  PRaiseFrame = ^TRaiseFrame;
  TRaiseFrame = packed record
    NextRaise: PRaiseFrame;
    ExceptAddr: Pointer;
    ExceptObject: TObject;
    ExceptionRecord: PExceptionRecord;
  end;
{$ENDIF}
Jedenfalls scheint es standarsmäßig wie bei Delphi 5 zu sein (also beim Compilieren von System.pas war PC_MAPPED_EXCEPTIONS undefiniert). Denn folgendes zeigt einen fröhlichen Smiley:

Delphi-Quellcode:
type
  PRaiseFrame = ^TRaiseFrame;
  TRaiseFrame = packed record
    NextRaise: PRaiseFrame;
    ExceptAddr: Pointer;
    ExceptObject: TObject;
    ExceptionRecord: PExceptionRecord;
  end;
begin
  try
    raise Exception.Create('');
  except
    on E: Exception do
    begin
      if PRaiseFrame(System.RaiseList).ExceptObject = E then
        ShowMessage(':-)')
      else
        ShowMessage(':-(');
    end;
  end;
end;
Und nun? :gruebel:

Mfg
FAlter

shmia 7. Sep 2007 15:17

Re: Normale Exceptions nicht anzueigen
 
Aus dem Link http://qc.borland.com/wc/qcmain.aspx?d=5815 lese ich heraus,
dass PC_MAPPED_EXCEPTIONS nur bei Kylix definiert ist.
=> Für Kylix wäre die Unit ExceptionList nicht kompilierbar und man müsste sich etwas Neues ausdenken.

FAlter 7. Sep 2007 16:31

Re: Normale Exceptions nicht anzueigen
 
Hi,

ah, na gut, damit kann ich leben.

Danke nochmal.

Mfg
FAlter


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:45 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz