-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Argument exceptions2 #476
base: dev/dev
Are you sure you want to change the base?
Argument exceptions2 #476
Commits on Aug 17, 2023
-
Remake argument-exceptions branch
Add API to use custom error handling when Argument parsing fails See #370 for the basis of these changes New changes here: - Arguments can only have an ArgumentParseExceptionHandler attached if they implement ArgumentParseExceptionArgument - The substitute value from ArgumentParseExceptionHandler doesn't have to be returned directly - ExceptionInformation can be provided by arguments - New NMS method to extract translation keys from CommandSyntaxExceptions
Configuration menu - View commit details
-
Copy full SHA for da16444 - Browse repository at this point
Copy the full SHA da16444View commit details -
Create InitialParseExceptionParser because TriFunction was being weird
I'm not really sure why this build failed (https://github.com/JorelAli/CommandAPI/actions/runs/5707823776/job/15468200688), but it is definitely TriFunctions fault >:)
Configuration menu - View commit details
-
Copy full SHA for bb78f3e - Browse repository at this point
Copy the full SHA bb78f3eView commit details -
Fix implementation of NMS_Common#extractTranslationKey for pre 1.19
Also, some tweaks to the annotations on implementations for NMS#registerCustomArgumentType
Configuration menu - View commit details
-
Copy full SHA for 10cd400 - Browse repository at this point
Copy the full SHA 10cd400View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17543b6 - Browse repository at this point
Copy the full SHA 17543b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7191cd9 - Browse repository at this point
Copy the full SHA 7191cd9View commit details -
Address some SonarCloud code smells on
argument-exceptions2
Remove obsolete unused type parameter T from InitialParseExceptionParser Change test classes to default package visibility
Configuration menu - View commit details
-
Copy full SHA for a1bf7b2 - Browse repository at this point
Copy the full SHA a1bf7b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6d987b - Browse repository at this point
Copy the full SHA e6d987bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba7c67e - Browse repository at this point
Copy the full SHA ba7c67eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05d01f3 - Browse repository at this point
Copy the full SHA 05d01f3View commit details -
Fix
Initial
ParseExceptionHandlingArgumentType accidentally being na……med `Internal`ParseExceptionHandlingArgumentType
Configuration menu - View commit details
-
Copy full SHA for a426196 - Browse repository at this point
Copy the full SHA a426196View commit details -
Create InitialParseExceptionNumberArgument to share ExceptionInformat…
…ion logic among Arguments that return numbers
Configuration menu - View commit details
-
Copy full SHA for c1ff4d3 - Browse repository at this point
Copy the full SHA c1ff4d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11a24b8 - Browse repository at this point
Copy the full SHA 11a24b8View commit details -
Move parse exception related classes in `dev.jorel.commandapi.argumen…
…ts` to `dev.jorel.commandapi.arguments.parseexceptions`
Configuration menu - View commit details
-
Copy full SHA for 62587ec - Browse repository at this point
Copy the full SHA 62587ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1974b30 - Browse repository at this point
Copy the full SHA 1974b30View commit details -
Fix variable name capitalization in InitialParseExceptionHandlingArgu…
…mentInfo classes
Configuration menu - View commit details
-
Copy full SHA for e2b8e99 - Browse repository at this point
Copy the full SHA e2b8e99View commit details -
Add InitialParseExceptionTextArgument for Arguments that use `StringA…
…rgumentType.string()`
Configuration menu - View commit details
-
Copy full SHA for 149d4d7 - Browse repository at this point
Copy the full SHA 149d4d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fac123 - Browse repository at this point
Copy the full SHA 0fac123View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3f65d3 - Browse repository at this point
Copy the full SHA e3f65d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5861f00 - Browse repository at this point
Copy the full SHA 5861f00View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae0fac4 - Browse repository at this point
Copy the full SHA ae0fac4View commit details -
Fix javadocs in InitialParseExceptionNumberArgument that refer to `in…
…t` rather than `number`
Configuration menu - View commit details
-
Copy full SHA for 5a1a16e - Browse repository at this point
Copy the full SHA 5a1a16eView commit details -
Add tests for InitialParseExceptionNumberArguments usage
Split each Argument in ArgumentPrimitiveTests into their own classes (Boolean, Double, Float, Integer, Long)
Configuration menu - View commit details
-
Copy full SHA for c41f567 - Browse repository at this point
Copy the full SHA c41f567View commit details -
Configuration menu - View commit details
-
Copy full SHA for d18e3d4 - Browse repository at this point
Copy the full SHA d18e3d4View commit details -
Add
InitialParseExceptionContextVerifier
and `ArgumentParseExceptio……nContextVerifier` so that ArgumentTests classes can test both types of exceptions
Configuration menu - View commit details
-
Copy full SHA for f9ff517 - Browse repository at this point
Copy the full SHA f9ff517View commit details -
Add
assertCorrectContext
method to ArgumentParseExceptionContextVer……ifier and InitialParseExceptionContextVerifier to handle shared checking logic on InitialParseExceptionContext and ArgumentParseExceptionContext objects
Configuration menu - View commit details
-
Copy full SHA for 412a0ef - Browse repository at this point
Copy the full SHA 412a0efView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7cc6d8 - Browse repository at this point
Copy the full SHA f7cc6d8View commit details -
Add
initialParseExceptionTestWithListTextArgument
Also some test javadocs tweaks
Configuration menu - View commit details
-
Copy full SHA for 3c72dde - Browse repository at this point
Copy the full SHA 3c72ddeView commit details
Commits on Aug 18, 2023
-
Change
exceptionHandlers
maps toWeakHashMaps
I couldn't get the maps to clear while tests were running, but I tried this on a real server and it seemed to work. Commands do need to keep reference their arguments for the parsing step, but if a command is unregistered, its arguments will be removed from the `exceptionHandlers` maps automatically.
Configuration menu - View commit details
-
Copy full SHA for 8d40f57 - Browse repository at this point
Copy the full SHA 8d40f57View commit details