mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

apply() in custom script does not have verbose log output

Open Cynthia7979 opened this issue 1 year ago • 2 comments

Describe the bug The apply(ChunkData data) function does not print an error trace to the log file when its execution fails.

To Reproduce

  1. Go to 'Tools > Change fields'
  2. Click on 'Script'
  3. Enter any script that would produce an error into the function body of apply. Simplest example: a
  4. Click 'OK'
  5. Click 'OK' in the confirmation dialog
  6. View the log file
  7. Observe the absence of error trace in the log

Expected behavior If the apply method produces any error while being executed, then a trace message for the exception should be printed to the log file in a similar fashion as how the "Custom" field and the before and after methods had done it.

Screenshots and other files mcaselector.log

Environment:

  • OS: Windows 10
  • Java version: 21.0.2
  • Version of MCA Selector: 2.4.2

Cynthia7979 avatar Oct 28 '24 07:10 Cynthia7979

First, I though this was an error on your side, but then I looked at the code and realized you're actually absolulety right. While it does print that there was an error, it does not print what exactly the error was.

Unfortunately, we can't really do anything about it until Querz is back and can merge the open PRs :(

arvitus avatar Nov 12 '24 23:11 arvitus

Oh I see, I didn't know Querz's on a break. Thanks for taking a look anyway. I guess we'll wait now for the PRs to be merged :P

Cynthia7979 avatar Nov 13 '24 14:11 Cynthia7979