mojira.dev
MCPE-224265

Bad error message when command block fails to run "execute" command

The bug

When a command block fails to run an execute command, the error message that appears in the “previous output” is unhelpful. It says “Failed to execute ‘command’ as [Null]”

How to reproduce

  1. Place a command block

  2. Write the command execute run kill @e[tag=fake]

  3. Activate it

  4. Look at the previous output

Expected result

Previous output should say “No targets matched selector”. This is the error message that appears if you just write kill @e[tag=fake] and is what happens in Java Edition.

Observed result

Previous output says “Failed to execute ‘kill’ as [Null].” This fails to tell you the actual reason the command failed (because there were no targets), and calls the command block [Null] which is confusing and unhelpful.

Attachments

Comments 1

Can confirm in 1.21.100 Windows.

tryashtar

(Unassigned)

1460598

Confirmed

Windows

1.21.100.22 Preview, 1.21.93 Hotfix, 1.21.100

Retrieved