Package com.articulate.sigma.tp
Class FormulaTranslationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.articulate.sigma.tp.ATPException
com.articulate.sigma.tp.FormulaTranslationException
- All Implemented Interfaces:
Serializable
Exception thrown when a formula cannot be translated from SUO-KIF
to a target format (TPTP, TFF, THF).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.articulate.sigma.tp.ATPException
ATPException.Builder -
Constructor Summary
ConstructorsConstructorDescriptionFormulaTranslationException(String message, String targetLanguage) Create a new FormulaTranslationExceptionFormulaTranslationException(String message, String targetLanguage, int line, int column) Create a new FormulaTranslationException with position infoFormulaTranslationException(String message, String targetLanguage, int line, List<String> stdout, List<String> stderr) Create a new FormulaTranslationException with a std errorsFormulaTranslationException(String message, String targetLanguage, Throwable cause) Create a new FormulaTranslationException with a cause -
Method Summary
Modifier and TypeMethodDescriptionGenerate a detailed, human-readable error message including context.intintGet a suggestion for how to resolve this error.booleanMethods inherited from class com.articulate.sigma.tp.ATPException
builder, getCommandLine, getCommandLineString, getEngineName, getResult, getStderr, getStderrString, getStdout, getStdoutString, getTimeoutMs, getWorkingDirectory, hasStderr, hasStdout, setResultMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FormulaTranslationException
Create a new FormulaTranslationException- Parameters:
message- Error message describing the translation failuretargetLanguage- The target language (FOF, TFF, THF)
-
FormulaTranslationException
Create a new FormulaTranslationException with position info- Parameters:
message- Error messagetargetLanguage- Target languageline- Line number where error occurred (1-based)column- Column number where error occurred (1-based)
-
FormulaTranslationException
Create a new FormulaTranslationException with a cause -
FormulaTranslationException
public FormulaTranslationException(String message, String targetLanguage, int line, List<String> stdout, List<String> stderr) Create a new FormulaTranslationException with a std errors
-
-
Method Details
-
getTargetLanguage
- Returns:
- The target language (FOF, TFF, THF)
-
getErrorLine
public int getErrorLine()- Returns:
- The line number where the error occurred, or -1 if unknown
-
getErrorColumn
public int getErrorColumn()- Returns:
- The column number where the error occurred, or -1 if unknown
-
hasPosition
public boolean hasPosition()- Returns:
- true if position information is available
-
getErrorDetail
- Returns:
- The specific error detail
-
getSuggestion
Description copied from class:ATPExceptionGet a suggestion for how to resolve this error. Subclasses should override with more specific suggestions.- Overrides:
getSuggestionin classATPException- Returns:
- Suggestion text for the user
-
getDetailedMessage
Description copied from class:ATPExceptionGenerate a detailed, human-readable error message including context.- Overrides:
getDetailedMessagein classATPException- Returns:
- Detailed message suitable for display in UI
-