Handle illegal errors thrown from plugin