Skip to content

Commit 676230b

Browse files
committed
Throw exception when we can't match call
1 parent a4c2cd0 commit 676230b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Generator/Client.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,13 @@ public static function generate(string $namespace, array $clients, SchemaRegistr
311311
// yield new Node\Stmt\Echo_([new Node\Scalar\String_('/**' . @var_export($operationCall, true) . '*/')]);
312312
}
313313
})($operationCalls))
314-
))
314+
))->addStmt(
315+
new Node\Stmt\Throw_(
316+
new Node\Expr\New_(
317+
new Node\Name('\InvalidArgumentException')
318+
)
319+
)
320+
)
315321
);
316322

317323
$class->addStmt(

0 commit comments

Comments
 (0)