Fixes: #1922 Better error message in class plugin