resourceloader: Use state "error" instead of "missing" in case of exceptions