Class ErrorBuffer

java.lang.Object
games.stendhal.common.ErrorBuffer
All Implemented Interfaces:
ErrorDrain
Direct Known Subclasses:
ConversationParser, Sentence

public class ErrorBuffer extends Object implements ErrorDrain
ErrorBuffer stores and concatenates multiple error messages.
Author:
Martin Fuchs
  • Field Details

    • errorBuffer

      protected String errorBuffer
      buffer for error messages
  • Constructor Details

    • ErrorBuffer

      public ErrorBuffer()
  • Method Details

    • setError

      public void setError(String error)
      Store error message.
      Specified by:
      setError in interface ErrorDrain
      Parameters:
      error - message
    • hasError

      public boolean hasError()
      Return whether some error has been registered.
      Specified by:
      hasError in interface ErrorDrain
      Returns:
      error flag
    • getErrorString

      public String getErrorString()
      Return the concatenated error message.
      Specified by:
      getErrorString in interface ErrorDrain
      Returns:
      error string