# Class SmiParseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.snmp4j.smi.SmiParseException

All Implemented Interfaces:
  `Serializable`

public final class SmiParseException extends Exception
The `SmiParseException` provides information about violations of the Structure of Management Information (SMI) v1 or v2 standards. Per MIB specification file, there might be more than one error reported by this exception.

Author:
  Frank Fock
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SmiParseException(List<SmiError> errors)`
  Creates a `SmiParseException` from a list of `SmiError`s.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<SmiError>`
  `getErrorList()`
  Gets the list of `SmiError`s.
  `String`
  `getMessage()`
  Gets the error message for all errors found in a MIB specification.
  `String`
  `toString()`

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SmiParseException

    public SmiParseException(List<SmiError> errors)
    Creates a `SmiParseException` from a list of `SmiError`s.
    Parameters:
      `errors` - the parse errors collected until bailing out with this exception.

- ## Method Details

  - ### getMessage

    public String getMessage()
    Gets the error message for all errors found in a MIB specification. Each error is separated by a double new line.
    Overrides:
      `getMessage` in class `Throwable`
    Returns:
      the error message text.

  - ### getErrorList

    public List<SmiError> getErrorList()
    Gets the list of `SmiError`s.
    Returns:
      the List of `SmiError`s for this MIB specification file.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Throwable`