Skip to content

Commit

Permalink
Fix to an exception error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainhalle committed Oct 1, 2020
1 parent 3466222 commit 45288a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Source/Core/src/ca/uqac/lif/ecp/TriagingFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public MathSet<U> getClass(Trace<T> trace)
{
reset();
MathSet<U> last = getStartClass();
for (T event : trace)
for (int i = 0; i < trace.size(); i++)
{
T event = trace.get(i);
last = read(event);
}
return last;
Expand Down
7 changes: 4 additions & 3 deletions Source/Core/src/ca/uqac/lif/ecp/atomic/AutomatonFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ public MathSet<U> read(AtomicEvent e)
throw new UnexpectedError("The transition relation of the automaton is not total: no outgoing edge from "
+ m_currentVertex + " with event " + e);
}
m_currentVertex = m_automaton.getVertex(edge.getDestination());
if (m_currentVertex == null)
Vertex<AtomicEvent> v = m_automaton.getVertex(edge.getDestination());
if (v == null)
{
throw new UnexpectedError("Edge refers to a nonexistent vertex ID: " + m_currentVertex.getId());
throw new UnexpectedError("Edge refers to a nonexistent vertex ID: " + edge.getDestination());
}
m_currentVertex = v;
return processTransition(edge);
}

Expand Down

0 comments on commit 45288a9

Please sign in to comment.