<commit_before>/* $Id$
 *
 * Copyright 2008 University of Edinburgh.
 * All Rights Reserved
 */
package uk.ac.ed.ph.snuggletex;

import uk.ac.ed.ph.aardvark.commons.util.ObjectUtilities;
import uk.ac.ed.ph.snuggletex.conversion.FrozenSlice;

import java.io.Serializable;

/**
 * Encapsulates an error in the LaTeX input, providing information about what the error is and
 * where it occurred.
 * 
 * @author  <NAME>
 * @version $Revision$
 */
public final class InputError implements Serializable {
    
    private static final long serialVersionUID = 437416586924703932L;
    
    /** Slice the error occurred in. This may be null in certain circumstances */
    private final FrozenSlice slice;
    
    /** Error code */
    private final ErrorCode errorCode;
    
    /** 
     * Any additional arguments about the error. These are passed to {@link MessageFormatter}
     * when formatting errors in a readable form.
     */
    private final Object[] arguments;
    
    public InputError(final ErrorCode errorCode, final FrozenSlice slice, final Object... arguments) {
        this.slice = slice;
        this.errorCode = errorCode;
        this.arguments = arguments;
    }
    
    public ErrorCode getErrorCode() {
        return errorCode;
    }
    <commit_msg>No longer implements Serializable as FrozenSlice doesn't so the useful of this was negligible.<commit_after>/* $Id$
 *
 * Copyright 2008 University of Edinburgh.
 * All Rights Reserved
 */
package uk.ac.ed.ph.snuggletex;

import uk.ac.ed.ph.aardvark.commons.util.ObjectUtilities;
import uk.ac.ed.ph.snuggletex.conversion.FrozenSlice;

/**
 * Encapsulates an error in the LaTeX input, providing information about what the error is and
 * where it occurred.
 * 
 * @author  <NAME>
 * @version $Revision$
 */
public final class InputError {
    
    /** Slice the error occurred in. This may be null in certain circumstances */
    private final FrozenSlice slice;
    
    /** Error code */
    private final ErrorCode errorCode;
    
    /** 
     * Any additional arguments about the error. These are passed to {@link MessageFormatter}
     * when formatting errors in a readable form.
     */
    private final Object[] arguments;
    
    public InputError(final ErrorCode errorCode, final FrozenSlice slice, final Object... arguments) {
        this.slice = slice;
        this.errorCode = errorCode;
        this.arguments = arguments;
    }
    
    public ErrorCode getErrorCode() {
        return errorCode;
    }
    
{'fraction_non_alphanumeric': 0.08526821457165733, 'fraction_numerical': 0.010408326661329063, 'mean_word_length': 2.8684210526315788, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7047950', 'n_tokens_mistral': 716, 'n_tokens_neox': 685, 'n_words': 239}