MCPcopy Create free account
hub / github.com/build2/build2 / convert_throw

Function convert_throw

libbuild2/variable.cxx:420–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418 }
419
420 [[noreturn]] void
421 convert_throw (const value_type* from, const value_type& to)
422 {
423 string m ("invalid ");
424 m += to.name;
425 m += " value: ";
426
427 if (from != nullptr)
428 {
429 m += "conversion from ";
430 m += from->name;
431 }
432 else
433 m += "null";
434
435 throw invalid_argument (move (m));
436 }
437
438 // Throw invalid_argument for an invalid simple value.
439 //

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected