Prevented crashing the game for a script error when using an item.

And report the error instead while keeping the item in inventory.