In fact you really don't want to return error messages since this is a utility function and not a frontend function. Just throw something like MissingDependencyException for instance