Skip to content

Commit

Permalink
rename exception
Browse files Browse the repository at this point in the history
  • Loading branch information
meevee98 committed Jan 6, 2020
1 parent 034eae0 commit 5c0a041
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 @@ -38,7 +38,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 5c0a041

Please sign in to comment.