Package games.stendhal.common
Interface ErrorDrain
- All Known Implementing Classes:
ConversationParser
,ErrorBuffer
,Sentence
,SentenceImplementation
public interface ErrorDrain
ErrorDrain registers error messages while executing some algorithm like parsing command line texts.
- Author:
- Martin Fuchs
-
Method Summary
Modifier and TypeMethodDescriptiongets the error messageboolean
hasError()
did an error occur?void
sets an error message
-
Method Details
-
setError
sets an error message- Parameters:
error
- error message
-
hasError
boolean hasError()did an error occur?- Returns:
- true, if an error occurred; false otherwise
-
getErrorString
String getErrorString()gets the error message- Returns:
- error message or
null
-