You are not logged in.
Pages: 1
Hi AB, many thanks to great framework.
I have
FClients: TSynDictionary;
TSynDictionary.SaveToJson generate below json :
{1:{"ConnectionId":1,"ComputerName":"Test"},2:{"ConnectionId":2,"ComputerName":"Comp"}}
which is not valid json.
how can I remove "{1:","{2:", ... from Result.
Last edited by anouri (2025-04-29 13:28:34)
Offline
How is your TSynDictionary initialized? Which data?
Edit:
I guess you had something like TIntegerDynArray as keys.
I have fixed the serialization of such content:
https://github.com/synopse/mORMot2/commit/240b293da4e7
Offline
Yes.
type
TClient = record
ConnectionId: THttpServerConnectionID;
ComputerName: string;
end;
TClients = array of TClient;
TInt64DynArray = array of Int64;
FClients := TSynDictionary.Create(TypeInfo(TInt64DynArray), TypeInfo(TClients));
Offline
Solved with this commit.
Thank you so much
Offline
After upgrading to the new version I encountered another problem. madexcept stopped working and to solve the issue I had to use the following option:
TAppLog.Family.Level := [sllInfo, sllWarning]
instead of
TAppLog.Family.Level := LOG_VERBOSE
I actually used mormot logging feature in a Windows desktop project.
Last edited by anouri (2025-04-30 14:15:27)
Offline
I tried
TAppLog.Family.StackTraceUse := stOnlyManual;
and
TAppLog.Family.LevelStackTrace := [];
with not success!
Is there a way to set TSynLog that don't capture exceptions?
Offline
Nothing changed about all exception are intercepted by the framework, AFAICT.
You can either use instead LOG_VERBOSE - [sllException, sllExceptionOs]
or set the NOEXCEPTIONINTERCEPT conditional.
I have also just added SynLogNoExceptionIntercept global variable:
https://github.com/synopse/mORMot2/commit/c51b76eff
Offline
Very useful. Thank you so much.
Offline
I have huge project implemented by delphi vcl with 600 forms.
I use madexcept to catch and show unhandeded exceptions.
if mormot can handle this. I mean if there is onException Event handler or somthing like this. I can replace it with mormot.
Myabe OnBeforeException event can help.
I also show call stack to end user when exception is unhandeled:
https://gist.github.com/a-nouri/8ddfe5d … 8bdf28ae69
show_error function shows error in form to end user. and then sent to my website and I save unhandedled exceptions in table in web site by php.
Last edited by anouri (2025-05-01 09:33:37)
Offline
Pages: 1