-
-
Notifications
You must be signed in to change notification settings - Fork 934
avm2: Move a lot of exception creation into error.rs
#22281
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
Merged
Lord-McSweeney
merged 18 commits into
ruffle-rs:master
from
Lord-McSweeney:avm2-exception-better
Nov 21, 2025
Merged
avm2: Move a lot of exception creation into error.rs
#22281
Lord-McSweeney
merged 18 commits into
ruffle-rs:master
from
Lord-McSweeney:avm2-exception-better
Nov 21, 2025
+588
−428
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moulins
approved these changes
Nov 21, 2025
Remove `ill_formed_markup_error`, as it's redundant now
- The error message for wrong type now includes the error id as it should - We no longer panic when passed a primitive
Also use `get_string_non_null` instead of `try_get_string` and `make_error_2007` in `BitmapData.threshold`
When the first argument isn't a child of the reciever, and the second argument is null, error #2025 is thrown, not error ruffle-rs#2007
Our custom error messages were rarely helpful and prevented us from using `make_error_2006`
Also fix the error message differing from avmplus in some cases
Also make it consistent with the rest of the error creation functions
34651fc to
f767c66
Compare
Hancock33
added a commit
to Hancock33/batocera.piboy
that referenced
this pull request
Nov 23, 2025
--------------------------------------------------------------------------------------- amiberry.mk 761b15fd2b45d3d5bc2d77e5d3d66374c9149d4d # Version: Commits on Nov 21, 2025 --------------------------------------------------------------------------------------- bugfix: Fixed JIT FPU would not enable from uae-configuration When using uae-configuration to enable JIT, JIT FPU would not also get enabled, -------------------------------------------------------------------------------------------- amiberry-lite.mk 341b976f6d80ba0aa3e760bed91979538f7362a9 # Version: Commits on Nov 21, 2025 -------------------------------------------------------------------------------------------- Bump version to 5.9.1, ------------------------------------------------------------------------------------------ dolphin-emu.mk e526c1ffde96e619bc764167f6fc337db74551ed # Version: Commits on Nov 22, 2025 ------------------------------------------------------------------------------------------ Merge pull request #14145 from cristian64/exclude_cpp-ipc_installation Externals: Add cpp-ipc subdirectory with `EXCLUDE_FROM_ALL`., ------------------------------------------------------------------------------------------ duckstation.mk 5d9309cd55e4ec32ed65c39bebfbb645b160b285 # Version: Commits on Nov 22, 2025 ------------------------------------------------------------------------------------------ Qt: Make parented progress callback dialog window modal Maybe this'll help with it not appearing for some Linux users... Whole thing needs to be re-done with threads., ----------------------------------------------------------------------------------- eden.mk d8caa7423302a9e354bf459562316ee5d93d4d5d # Version: Commits on Nov 22, 2025 ----------------------------------------------------------------------------------- [video_core] Fix regressions introduced in #3015 (#3068) -------------------------------------------------------------------------------------- flycast.mk 1666eb0875613ee16b04e08be8ed89c27dbd5c25 # Version: Commits on Nov 22, 2025 -------------------------------------------------------------------------------------- android: ignore touchpad axes (dualshock 4) The touchpad also reports motion events on the same axis numbers, but the range source is different so ignore them. Override known axes in mapping when the gamepad is connected. Issue #2109, ---------------------------------------------------- pcsx2.mk v2.5.317 # Version: Commits on Nov 21, 2025 ---------------------------------------------------- - [Qt: Various warning cleanups](PCSX2/pcsx2#13414) ------------------------------------------------------------------------------------ rpcs3.mk a3f7c0d67f7b2aee900201952793fabd15d17903 # Version: Commits on Nov 21, 2025 ------------------------------------------------------------------------------------ Fix typo, ------------------------------------------------- vice.mk r45865 # Version: Commits on Nov 21, 2025 ------------------------------------------------- fixed link to cart doc. git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45865 379a1393-f5fb-40a0-bcee-ef074d9b53f7, ------------------------------------------------------------------------------------- vita3k.mk 59250a64e7afbb4c475f27b385aa10eb344bcdc1 # Version: Commits on Nov 13, 2025 ------------------------------------------------------------------------------------- .github: update actions, ------------------------------------------------------------------------------------- ikemen.mk 3650cdd7dc99226a4381debb8a6faf54756f4684 # Version: Commits on Nov 22, 2025 ------------------------------------------------------------------------------------- style: fix code style issues with gofmt, --------------------------------------------------------------- ruffle.mk nightly-2025-11-22 # Version: Commits on Nov 22, 2025 --------------------------------------------------------------- ## What's Changed * avm2: Move a lot of exception creation into `error.rs` by @Lord-McSweeney in ruffle-rs/ruffle#22281 **Full Changelog**: ruffle-rs/ruffle@nightly-2025-11-21...nightly-2025-11-22, ------------------------------------------------------------------------------------ box64.mk 187b9af1b6b2627ba42baf76f2400eba2d6a510a # Version: Commits on Nov 22, 2025 ------------------------------------------------------------------------------------ [CMAKE] Fixed a typo (#3204), --------------------------------------------------------------------------------------- corsixth.mk 28bacb6a3a79ea43228c7afe51d08644df2e533e # Version: Commits on Nov 22, 2025 --------------------------------------------------------------------------------------- Merge pull request #3117 from TheCycoONE/midi_device Midi device support, ---------------------------------------------------------------------------------------- openmohaa.mk a7675998936d7282ee1eca77c7be2b9e08b36453 # Version: Commits on Nov 21, 2025 ---------------------------------------------------------------------------------------- fix(fgame): fix portable turret placement, ----------------------------------------------------------------------------------- rott.mk fed0d34ad8feb95c6bab28a309cd8aff0e4a0cd9 # Version: Commits on Nov 22, 2025 ----------------------------------------------------------------------------------- soundfont: let environment variables override the config key, ------------------------------------------------------------------------------------------------ libretro-mame-src.mk 102100bfc0b7d38bf3d8a3f17762f18ba70146f0 # Version: Commits on Nov 21, 2025 ------------------------------------------------------------------------------------------------ Merge remote-tracking branch 'upstream/master', ------------------------------------------------------------------------------------------------- libretro-core-info.mk 20e7d555f911f5aa6712d5937f7b9b834015d88d # Version: Commits on Nov 22, 2025 ------------------------------------------------------------------------------------------------- v1.22.2, ---------------------------------------------------------------------------------------- retroarch.mk 5b9763b3eaf434f3c80ee8b78479e63eb1aa8a0c # Version: Commits on Nov 22, 2025 ---------------------------------------------------------------------------------------- coreaudio: prevent null buffer by forcing min latency, ---------------------------------------------------------------------------------------- doomretro.mk 42c9a74691004a2a8e5187071b44811588fe8626 # Version: Commits on Nov 22, 2025 ---------------------------------------------------------------------------------------- Revert \Improve scrolling in console\, ---------------------------------------------------------------------------------- trx.mk 3abc521a429bfb8119cce53beceb8520f14f3bd0 # Version: Commits on Nov 21, 2025 ---------------------------------------------------------------------------------- matrix: increase precision, ----------------------------------------------------------------------------------------------- libretro-dolphin.mk df2b1a754bba4f0595d3ed07ccd0711019e014b8 # Version: Commits on Nov 21, 2025 ----------------------------------------------------------------------------------------------- Add crop overscan option This option fixes NTSC video output for CRT displays by cropping the 528-line EFB to standard 480i/p resolution., ----------------------------------------------------------------------------------------------- libretro-flycast.mk 1666eb0875613ee16b04e08be8ed89c27dbd5c25 # Version: Commits on Nov 22, 2025 ----------------------------------------------------------------------------------------------- android: ignore touchpad axes (dualshock 4) The touchpad also reports motion events on the same axis numbers, but the range source is different so ignore them. Override known axes in mapping when the gamepad is connected. Issue #2109, ---------------------------------------------------------------------------------------------- libretro-stella.mk 5d737b2e54717753be235c4fd2cd172e307da623 # Version: Commits on Nov 22, 2025 ---------------------------------------------------------------------------------------------- removed 'f' at beginning of file (resolves #1108), --------------------------------------------------------------------------------------------- libretro-vba-m.mk 8a11a9f010ddce8aeb0b17f2e498647ed084f762 # Version: Commits on Nov 21, 2025 --------------------------------------------------------------------------------------------- build: adjust `zip.ps1` to work more like InfoZip Adjust the `zip.ps1` script added for when InfoZip is not available in f6a17146 (build: use pwsh to zip on Windows when no zip, 2025-11-19) to work more like InfoZip in the entry creation and order and compression level. Changed with Claude and manual changes. Signed-off-by: Rafael Kitover <rkitover@gmail.com>,
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's better to have all our error object creation in one place, and the error creation functions are
#[inline(never)]and#[cold].This also fixes some minor inaccuracies with error handling across playerglobals.
Because there are so many places where we construct errors, I've only moved about half of the error constructions to
error.rs. I'll move the rest in future PRs.Because the main error creation and formatting is now in non-inlined functions, with this PR, the codegens for
Activation::init_from_method,function::exec, andValue::coerce_to_primitiveare all smaller and use less stack space.