Skip to content

Commit 87cf239

Browse files
committed
Changed some Exception constructings to Conveyor::makeException callings
1 parent cd74be3 commit 87cf239

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/Parsing/ClassState.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function step(Conveyor $conveyor): State {
9999
return $this;
100100
}
101101

102-
throw new \Exception('Open bracket not found');
102+
throw $conveyor->makeException('Open bracket expected');
103103

104104
case 2:
105105
$this->builder->setExtends($conveyor->readExtendedClassname());
@@ -142,7 +142,7 @@ public function step(Conveyor $conveyor): State {
142142
return $this->parent;
143143
}
144144

145-
throw new \Exception('Close bracket not found');
145+
throw $conveyor->makeException('Close bracket expected');
146146

147147
case 6:
148148
$this->builder->addField($this->field->getBuilder());

app/Parsing/FieldState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function step(Conveyor $conveyor): State {
9393
return $this;
9494
}
9595

96-
throw new \Exception('Expected val/var operator');
96+
throw $conveyor->makeException('val/var operator expected');
9797

9898
case 2:
9999
$this->builder->setName($conveyor->readName());

0 commit comments

Comments
 (0)