Class Throw

    • Constructor Detail

      • Throw

        public Throw​(CFG cfg,
                     CodeLocation location,
                     Expression expression)
        Builds the throw, raising expression as error, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this statement belongs to
        location - the location where the expression is defined within the program
        expression - the expression to raise as error
    • Method Detail

      • toString

        public final java.lang.String toString()
        Specified by:
        toString in class Statement
      • stopsExecution

        public boolean stopsExecution()
        Description copied from class: Statement
        Whether or not this statement stops the execution of the containing cfg, either by throwing an error or returning a value. To distinguish error-raising halting statements and normal ones, use Statement.throwsError().
        Overrides:
        stopsExecution in class Statement
        Returns:
        true only if that condition holds
      • throwsError

        public boolean throwsError()
        Description copied from class: Statement
        Whether or not this statement throws an error, halting the normal execution of the containing cfg.
        Overrides:
        throwsError in class Statement
        Returns:
        true only if that condition holds