Class SemanticException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.douira.glsl_transformer.transform.SemanticException
All Implemented Interfaces:
Serializable

public class SemanticException extends RuntimeException
The semantic exception should be thrown by a transformation phase when the parsed code has semantic errors or there is some other content-related reason why the transformation process should be halted.
See Also:
  • Constructor Details

    • SemanticException

      public SemanticException()
      Creates a new empty semantic exception.
    • SemanticException

      public SemanticException(String message)
      Creates a new semantic exception with a message string.
      Parameters:
      message - The message of the exception
    • SemanticException

      public SemanticException(String message, ParseTree node)
      Creates a new semantic exception with a message string and a parse tree node. The node can be given if the error occurred in a specific node or while processing a specific node.
      Parameters:
      message - The message of the exception
      node - The parse tree node to store in the exception
  • Method Details

    • getNode

      public ParseTree getNode()
      Returns the exception's parse tree node if there is one.
      Returns:
      The node