@@ -255,8 +255,7 @@ algorithm
255255 // unknown attributes here.
256256 else
257257 algorithm
258- assert (false , getInstanceName() + " got unknown type attribute " +
259- Modifier . name(m));
258+ Error . assertion(false , getInstanceName() + " got unknown type attribute " + Modifier . name(m), sourceInfo());
260259 then
261260 fail();
262261 end match;
@@ -286,8 +285,7 @@ algorithm
286285 // unknown attributes here.
287286 else
288287 algorithm
289- assert (false , getInstanceName() + " got unknown type attribute " +
290- Modifier . name(m));
288+ Error . assertion(false , getInstanceName() + " got unknown type attribute " + Modifier . name(m), sourceInfo());
291289 then
292290 fail();
293291 end match;
@@ -314,8 +312,7 @@ algorithm
314312 // unknown attributes here.
315313 else
316314 algorithm
317- assert (false , getInstanceName() + " got unknown type attribute " +
318- Modifier . name(m));
315+ Error . assertion(false , getInstanceName() + " got unknown type attribute " + Modifier . name(m), sourceInfo());
319316 then
320317 fail();
321318 end match;
@@ -342,8 +339,7 @@ algorithm
342339 // unknown attributes here.
343340 else
344341 algorithm
345- assert (false , getInstanceName() + " got unknown type attribute " +
346- Modifier . name(m));
342+ Error . assertion(false , getInstanceName() + " got unknown type attribute " + Modifier . name(m), sourceInfo());
347343 then
348344 fail();
349345 end match;
@@ -372,8 +368,7 @@ algorithm
372368 // unknown attributes here.
373369 else
374370 algorithm
375- assert (false , getInstanceName() + " got unknown type attribute " +
376- Modifier . name(m));
371+ Error . assertion(false , getInstanceName() + " got unknown type attribute " + Modifier . name(m), sourceInfo());
377372 then
378373 fail();
379374 end match;
@@ -396,7 +391,7 @@ algorithm
396391
397392 else
398393 algorithm
399- assert (false , getInstanceName() + " got untyped binding" );
394+ Error . assertion (false , getInstanceName() + " got untyped binding" , sourceInfo() );
400395 then
401396 fail();
402397
@@ -427,13 +422,13 @@ algorithm
427422
428423 case Modifier . MODIFIER (binding = Binding . TYPED_BINDING ())
429424 algorithm
430- assert (false , getInstanceName() + " got non StateSelect value" );
425+ Error . assertion (false , getInstanceName() + " got non StateSelect value" , sourceInfo() );
431426 then
432427 fail();
433428
434429 else
435430 algorithm
436- assert (false , getInstanceName() + " got untyped binding" );
431+ Error . assertion (false , getInstanceName() + " got untyped binding" , sourceInfo() );
437432 then
438433 fail();
439434
@@ -452,7 +447,7 @@ algorithm
452447 case "always" then DAE . StateSelect . ALWAYS ();
453448 else
454449 algorithm
455- assert (false , getInstanceName() + " got unknown StateSelect literal " + name);
450+ Error . assertion (false , getInstanceName() + " got unknown StateSelect literal " + name, sourceInfo() );
456451 then
457452 fail();
458453 end match;
@@ -506,7 +501,7 @@ algorithm
506501 // For equations should have been unrolled here.
507502 case Equation . FOR ()
508503 algorithm
509- assert (false , getInstanceName() + " got a for equation" );
504+ Error . assertion (false , getInstanceName() + " got a for equation" , sourceInfo() );
510505 then
511506 fail();
512507
@@ -645,7 +640,7 @@ algorithm
645640 // For equations should have been unrolled here.
646641 case Equation . FOR ()
647642 algorithm
648- assert (false , getInstanceName() + " got a for equation" );
643+ Error . assertion (false , getInstanceName() + " got a for equation" , sourceInfo() );
649644 then
650645 fail();
651646
@@ -941,7 +936,7 @@ algorithm
941936
942937 else
943938 algorithm
944- assert (false , getInstanceName() + " got unknown function" );
939+ Error . assertion (false , getInstanceName() + " got unknown function" , sourceInfo() );
945940 then
946941 fail();
947942
@@ -985,7 +980,7 @@ algorithm
985980
986981 else
987982 algorithm
988- assert (false , getInstanceName() + " got untyped component." );
983+ Error . assertion (false , getInstanceName() + " got untyped component." , sourceInfo() );
989984 then
990985 fail();
991986
0 commit comments