Mojira Archive
MC-186178

Data pack errors for function files are confusing, including duplicated and unnecessary info

The bug

When a file in a data pack has an error, the output log shows an error message. However this message is not immediately clear. It includes a stack trace and the actual error is duplicated twice.

Some other errors in data packs are nicely handled and show a nice error on one line

Couldn't load function tag test:bar as it is missing following references: test:foo (from data_pack_name)

Current behavior

Failed to load function test:foo
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 11: ...coreboard <--[HERE]
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1584)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1574)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 1: Incorrect argument for command at position 11: ...coreboard <--[HERE]
	at cv.a(SourceFile:62)
	at up.a(SourceFile:84)
	at up$$Lambda$3883/1010785775.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1582)
	... 5 more

Expected behavior

Failed to load function test:foo (from data_pack_name)
Whilst parsing command on line 1: Incorrect argument for command at position 11: ...coreboard <--[HERE]

Unresolved

[Helper] Misode

2020-05-29, 07:16 PM

2023-10-26, 06:29 PM

8

5

Confirmed

Low

Platform

Data Packs

20w22a - 1.1820w22a, 1.16 Pre-release 3, 1.16.1, 20w29a, 1.16.2 Pre-release 2, 1.16.2, 1.16.4, 20w45a, 1.18

-