diff --git a/src/shared/xdynrec.pas b/src/shared/xdynrec.pas
index f129dd035af96a9b8c12f84feec6bf58a35349b8..456a01376f25c8ce60c8aa65236d78cc90ad0927 100644 (file)
--- a/src/shared/xdynrec.pas
+++ b/src/shared/xdynrec.pas
implementation
uses
- SysUtils;
+ SysUtils, e_log;
// ////////////////////////////////////////////////////////////////////////// //
if (Length(fld.mRecRefId) = 0) then continue;
assert(fld.mEBSType <> nil);
rt := findRecordByTypeId(fld.mEBSTypeName, fld.mRecRefId);
- if (rt = nil) then raise Exception.Create(Format('record of type ''%s'' with id ''%s'' links to inexistant record of type ''%s'' with id ''%d''', [rec.mName, rec.mId, fld.mEBSTypeName, fld.mRecRefId]));
+ if (rt = nil) then
+ begin
+ e_LogWritefln('record of type ''%s'' with id ''%s'' links to inexistant record of type ''%s'' with id ''%s''', [rec.mName, rec.mId, fld.mEBSTypeName, fld.mRecRefId], MSG_WARNING);
+ //raise Exception.Create(Format('record of type ''%s'' with id ''%s'' links to inexistant record of type ''%s'' with id ''%s''', [rec.mName, rec.mId, fld.mEBSTypeName, fld.mRecRefId]));
+ end;
//writeln(' ', rec.mName, '.', rec.mId, ':', fld.mName, ' -> ', rt.mName, '.', rt.mId, ' (', fld.mEBSTypeName, '.', fld.mRecRefId, ')');
fld.mRecRefId := '';
fld.mRecRef := rt;
if (btype = 0) then break; // no more blocks
readLongWord(st); // reserved
bsize := readLongInt(st);
- //writeln('btype=', btype, '; bsize=', bsize);
+ {$IF DEFINED(D2D_XDYN_DEBUG)}writeln('btype=', btype, '; bsize=', bsize);{$ENDIF}
if (bsize < 0) or (bsize > $1fffffff) then raise Exception.Create(Format('block of type %d has invalid size %d', [btype, bsize]));
if loaded[btype] then raise Exception.Create(Format('block of type %d already loaded', [btype]));
loaded[btype] := true;