package ru.yandex.autodoc.wmtools.params.fetch.impl.common;

import ru.yandex.wmtools.common.error.UserException;

/**
 * @author avhaliullin
 */
public class ErrorListener {
    private UserException error = null;

    public void error(UserException error) {
        if (this.error == null) {
            this.error = error;
        }
    }

    public UserException getError() {
        return error;
    }

    public boolean hasError() {
        return error != null;
    }
}