Skip to content

Commit

Permalink
rename exception
Browse files Browse the repository at this point in the history
  • Loading branch information
meevee98 committed Dec 20, 2019
1 parent 99b7542 commit c82a9f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package br.com.pnp.exception

import org.antlr.v4.runtime.Token

class MissingOutputAssignment(token: Token) :
class MissingOutputAssignmentException(token: Token) :
SemanticException(token, "Missing output variable assignment")
4 changes: 2 additions & 2 deletions src/main/kotlin/br/com/pnp/semantic/PnpContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package br.com.pnp.semantic
import br.com.pnp.exception.ConflictDeclarationException
import br.com.pnp.exception.IncompatibleTypeException
import br.com.pnp.exception.MismatchedInputException
import br.com.pnp.exception.MissingOutputAssignment
import br.com.pnp.exception.MissingOutputAssignmentException
import br.com.pnp.exception.OperatorNotApplicableException
import br.com.pnp.exception.UnknownSemanticException
import br.com.pnp.exception.UnresolvedReferenceException
Expand Down Expand Up @@ -37,7 +37,7 @@ class PnpContext(val analyser: Analyser) : PnpBaseListener() {
val procedure = analyser.tryGet(identifier) as? Procedure
?: throw UnknownSemanticException(ctx.start)
if (!procedure.isOutputAssigned()) {
throw MissingOutputAssignment(ctx.procedureBody().procedureOutput().start)
throw MissingOutputAssignmentException(ctx.procedureBody().procedureOutput().start)
}
analyser.endScope()
}
Expand Down

0 comments on commit c82a9f2

Please sign in to comment.