net.sf.saxon.trans

## Class Err

- java.lang.Object
- - net.sf.saxon.trans.Err

-     public class Err
      extends Object

  Class containing utility methods for handling error messages

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ATTRIBUTE`
    `static int` | `ELEMENT`
    `static int` | `FUNCTION`
    `static int` | `GENERAL`
    `static int` | `URI`
    `static int` | `VALUE`
    `static int` | `VARIABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Err()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `abbreviateURI(String uri)` Abbreviate a URI for use in error messages
    `static CharSequence` | `depict(Item item)` Create a string representation of an item for use in an error message
    `static String` | `wrap(CharSequence cs)` Add delimiters to represent variable information within an error message
    `static String` | `wrap(CharSequence cs, int valueType)` Add delimiters to represent variable information within an error message
    `static String` | `wrap(Expression exp)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### ELEMENT

          public static final int ELEMENT

      See Also:
        Constant Field Values

    - #### ATTRIBUTE

          public static final int ATTRIBUTE

      See Also:
        Constant Field Values

    - #### FUNCTION

          public static final int FUNCTION

      See Also:
        Constant Field Values

    - #### VALUE

          public static final int VALUE

      See Also:
        Constant Field Values

    - #### VARIABLE

          public static final int VARIABLE

      See Also:
        Constant Field Values

    - #### GENERAL

          public static final int GENERAL

      See Also:
        Constant Field Values

    - #### URI

          public static final int URI

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Err

          public Err()

  - ### Method Detail

    - #### wrap

          public static String wrap(CharSequence cs)

      Add delimiters to represent variable information within an error message
      Parameters:
        `cs` - the variable information to be delimited
      Returns:
        the delimited variable information

    - #### wrap

          public static String wrap(CharSequence cs,
                    int valueType)

      Add delimiters to represent variable information within an error message
      Parameters:
        `cs` - the variable information to be delimited
        `valueType` - the type of value, e.g. element name or attribute name
      Returns:
        the delimited variable information

    - #### depict

          public static CharSequence depict(Item item)

      Create a string representation of an item for use in an error message

    - #### abbreviateURI

          public static String abbreviateURI(String uri)

      Abbreviate a URI for use in error messages
      Parameters:
        `uri` - the full URI
      Returns:
        the URI, truncated at the last slash or to the last 15 characters, with a leading ellipsis, as appropriate

    - #### wrap

          public static String wrap(Expression exp)

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.