Page 1 of 1

change error message

Posted: Sun Mar 01, 2020 8:51 pm
by Optera
What?
Please change the the Error message to display the mod actually causing an error in the first line.
Why?
Currently when using an API with script.raise the mod raising the event is listed as the one causing the error instead of the one failing to read the event.
Image

The message correctly states the mod actually causing the error only after mentioning the mod raising the event 2 times.
This has the unpleasant effect of me getting swamped by such error reports whenever I change my API.
It would be less confusing to users if the first paragraph was removed and line 1 and 2 in the 2nd paragraph where swapped.

Re: change error message

Posted: Sun Mar 01, 2020 8:53 pm
by Bilka
Moved to modding interface requests (I assume that is where you meant to post)

Re: change error message

Posted: Sun Mar 01, 2020 8:57 pm
by Optera
Bilka wrote:
Sun Mar 01, 2020 8:53 pm
Moved to modding interface requests (I assume that is where you meant to post)
Thanks, I wasn't sure if it counts as an interface request.

Re: change error message

Posted: Tue Mar 03, 2020 1:24 pm
by Rseding91
I don't see this as ever having a satisfactory solution. There's no clear 'this mod is at fault' when an error happens during raise_event between 2 mods. The game has no way to know if there's actually a logic error on the mod-currently-running-event or if there's a logic error on the mod passing data to raise_event.

So, I'm going to just say "meh" and leave it as is. I still want to disable raise_event for base game events anyway which would make it clear at that point which mod is at fault.

Re: change error message

Posted: Tue Mar 03, 2020 3:01 pm
by Optera
Rseding91 wrote:
Tue Mar 03, 2020 1:24 pm
I don't see this as ever having a satisfactory solution. There's no clear 'this mod is at fault' when an error happens during raise_event between 2 mods. The game has no way to know if there's actually a logic error on the mod-currently-running-event or if there's a logic error on the mod passing data to raise_event.

So, I'm going to just say "meh" and leave it as is. I still want to disable raise_event for base game events anyway which would make it clear at that point which mod is at fault.
Who is at fault when a mod does something like referencing event.entity during on_built_entity?
Would you want to get constant bug reports about Factorio being broken just because someone else was too lazy to check the latest API documentation and see it's actually event.created_entity?