You are not logged in.
Delphi 2007, mORMot2 GitHub commit 1488
I have completely changed my program from mORMot1 to mORMot2. Not completely, there is still one place missing. Until then everything works fine. If I change the last piece to mORMot2, the following error message comes up when I start the program:
exception class: EJSONException
exception message: Rtti.Count=2 at mormot.core.json start.
It is triggered in unit mormot.core.json in the function:
procedure InitializeUnit;
...
if Rtti.Count > 0 then
raise EJSONException.CreateUtf8(
'Rtti.Count=% at mormot.core.json start', [Rtti.Count]);
Before that I make the following change in source code:
// , SynCommons // Umstellung mORMot1 -> mORMot2
, mormot.core.base
, mormot.core.data
And during initialization:
// FIndexHashed.InitSpecific(TypeInfo(TIndexItemArray), FIndex, djString, @FIndexCount); // Umstellung mORMot1 -> mORMot2
FIndexHashed.InitSpecific(TypeInfo(TIndexItemArray), FIndex, ptString, @FIndexCount);
The definition is as follows:
strict private
type
TIndexItem = record
groupName: String;
mapObjList: TVisMappingObjArray;
end;
TIndexItemArray = array of TIndexItem;
strict private
FIndex: TIndexItemArray;
FIndexCount: Integer;
FIndexHashed: TDynArrayHashed;
Can anyone give me a hint what I am doing wrong? If I change the two source code places back to mORMot1, my program runs again. Thanks a lot for the help.
With best regards...
Thomas
Last edited by tbo (2021-06-24 17:35:04)
Offline
I will make the error message more explicit.
Now it works. Thanks for the help. The new exception message is very helpful. Maybe one space too many "[ %]". Have a nice weekend.
With best regards...
Thomas
Offline