Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StarfallError hook and rework processor error reporting #1584

Merged
merged 15 commits into from
Jan 1, 2024

Conversation

adamnejm
Copy link
Collaborator

@adamnejm adamnejm commented Dec 26, 2023

Continuing the discussion from #1582 (comment): How about this?

The hook runs on both realms and is relayed to ALL PLAYERS. This is something you didn't want, but I thought it could be useful in the future or maybe for other addons. I can change it if you really really want tho :(

Parameters in the global StarfallError hook are:

  • Chip
  • Owner of the chip
  • Client it errored for or nil if the error originated on the serverside
  • Path of the main script
  • Error message
  • Traceback
  • Whether it should notify the owner. Note that this argument only exists if the error originated from other client and is undefined otherwise. This is used to determine whether the owner should receive a pop-up notificaiton.

Regarding the notifications, in addition to checking if sf_timebuffer_cl is greater than 0, now it also checks whether the user has blocked your Starfalls. It's super annoying to constantly receive these notifications from people you might've allegedly minged in the past :)

I need clarification on 2 things though:

  • Right now if somebody else's chip errors on your clientside, you only get Starfall 'main' owned by Name has errored: SF:main:6: some error message logged to the console, but no traceback unlike previously. Is that OK? Keep in mind that owner of the chip will still get the full traceback printed for that client so they can debug the script.
  • What's this limit and is it still needed?

@thegrb93
Copy link
Owner

I finished cleaning it up if you want to verify it

@thegrb93
Copy link
Owner

I also clamped the strings to 1024 length

@adamnejm
Copy link
Collaborator Author

@thegrb93 I got fixes for all of those, want me to push them?

@adamnejm
Copy link
Collaborator Author

Well, Imma push them, you can revert stuff you don't like or request changes.

@thegrb93
Copy link
Owner

Yah, push pls

@adamnejm
Copy link
Collaborator Author

adamnejm commented Dec 31, 2023

Yah, push pls

Yeah I did, for some reason GitHub displayed the commits way above all the review comments.
Probably went by commit time, not push time.

@thegrb93
Copy link
Owner

Looks good. I can test it out soon

@thegrb93 thegrb93 merged commit b129072 into thegrb93:master Jan 1, 2024
1 check passed
thegrb93 added a commit to adamnejm/StarfallEx that referenced this pull request Jan 1, 2024
…#1584)

* Rework error reporting and add 'StarfallError' hook

---------

Co-authored-by: Garrett Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants