Page 1 of 1
[2.0.8] make ::on_save serialization errors more verbose
Posted: Wed Oct 23, 2024 9:01 am
by Mithaldu
Right now, according to Therenas, there is not much more useful information provided by this error, so on his suggestion i'm requesting a change to the error to be a bit more verbose.
Code: Select all
Error while running event YARM::on_save()
Cannot serialise lua functions
Re: [2.0.8] make ::on_save serialization errors more verbose
Posted: Sun Mar 30, 2025 2:58 pm
by SnelleSjonnie
Agree, please make this error a bit more developer friendly.
Re: [2.0.8] make ::on_save serialization errors more verbose
Posted: Sun Mar 30, 2025 3:05 pm
by Rseding91
Verbose in what way? What information are you hoping we could include in the error?
Re: [2.0.8] make ::on_save serialization errors more verbose
Posted: Sun Mar 30, 2025 3:57 pm
by boskid
I do not know what exactly you want to know on top of what is already included in the error message. Since 2.0 (ref
113852) this error is thrown if you have lua functions inside of `storage`. Due to saving speed reasons, when lua values are saved we traverse the data in the most efficient way possible, by directly reading lua tables and lua values and if there is a lua function found we throw an error because this is an object that cannot be saved. If you want you can just dump the `storage` using serpent.dump and whenever you see eval() (if i remember correctly) then that was a lua function dumped and it is illegal to be there. Reason why this error is thrown is because lua functions cannot be serialised and if allowed they would have to be saved as nil instead and on load they would appear to be deleted. I do not want to include any extra path details because it is not doable in a simple way without affecting saving speed in normal case.
Re: [2.0.8] make ::on_save serialization errors more verbose
Posted: Sun Mar 30, 2025 4:00 pm
by Bilka
Would it help if the error said something like "Cannot save Lua functions in 'storage'"?