Hello everyone. I'm learning to write macros, and I've noticed that when there's a parsing error, the macro panics directly instead of providing useful error messages. Is there a way to make the JSON macro behave like a regular JSON editor, providing specific error messages like missing commas or values?
why println! can tell you detail error that too many args or not impl Debug
Because the macro implementation of format_args!()
(which println!()
internally uses) directly emits this error.
That is just a regular typecheck error, nothing related to macros at all.
I push my project to github GitHub - kouhe3/jsonparsar