@@ -143,7 +143,7 @@ void ValueVisitor::visitVariable(const peg::ast_node & variable)
143143 << " line: " << position.line
144144 << " column: " << position.byte_in_line ;
145145
146- throw schema_exception ({ error.str () }) ;
146+ throw schema_exception { { error.str () } } ;
147147 }
148148
149149 _value = response::Value (itr->second );
@@ -304,7 +304,7 @@ bool DirectiveVisitor::shouldSkip() const
304304
305305 error << " Invalid arguments to directive: " << entry.second ;
306306
307- throw schema_exception ({ error.str () }) ;
307+ throw schema_exception { { error.str () } } ;
308308 }
309309
310310 bool argumentTrue = false ;
@@ -322,7 +322,7 @@ bool DirectiveVisitor::shouldSkip() const
322322 error << " Invalid argument to directive: " << entry.second
323323 << " name: " << argument.first ;
324324
325- throw schema_exception ({ error.str () }) ;
325+ throw schema_exception { { error.str () } } ;
326326 }
327327
328328 argumentTrue = argument.second .get <response::BooleanType>();
@@ -344,7 +344,7 @@ bool DirectiveVisitor::shouldSkip() const
344344 error << " Missing argument to directive: " << entry.second
345345 << " name: if" ;
346346
347- throw schema_exception ({ error.str () }) ;
347+ throw schema_exception { { error.str () } } ;
348348 }
349349 }
350350
@@ -399,7 +399,7 @@ uint8_t Base64::verifyFromBase64(char ch)
399399
400400 if (result > 63 )
401401 {
402- throw schema_exception ({ " invalid character in base64 encoded string" }) ;
402+ throw schema_exception { { " invalid character in base64 encoded string" } } ;
403403 }
404404
405405 return result;
@@ -446,7 +446,7 @@ std::vector<uint8_t> Base64::fromBase64(const char* encoded, size_t count)
446446 {
447447 if (tail & 0x3 )
448448 {
449- throw schema_exception ({ " invalid padding at the end of a base64 encoded string" }) ;
449+ throw schema_exception { { " invalid padding at the end of a base64 encoded string" } } ;
450450 }
451451
452452 result.emplace_back (static_cast <uint8_t >((segment & 0xFF00 ) >> 8 ));
@@ -459,7 +459,7 @@ std::vector<uint8_t> Base64::fromBase64(const char* encoded, size_t count)
459459 {
460460 if (segment & 0xFF )
461461 {
462- throw schema_exception ({ " invalid padding at the end of a base64 encoded string" }) ;
462+ throw schema_exception { { " invalid padding at the end of a base64 encoded string" } } ;
463463 }
464464
465465 result.emplace_back (static_cast <uint8_t >((segment & 0xFF00 ) >> 8 ));
@@ -474,7 +474,7 @@ std::vector<uint8_t> Base64::fromBase64(const char* encoded, size_t count)
474474 || (count > 1 && padding != encoded[1 ])
475475 || count > 2 )
476476 {
477- throw schema_exception ({ " invalid padding at the end of a base64 encoded string" }) ;
477+ throw schema_exception { { " invalid padding at the end of a base64 encoded string" } } ;
478478 }
479479
480480 return result;
@@ -486,7 +486,7 @@ char Base64::verifyToBase64(uint8_t i)
486486
487487 if (result == padding)
488488 {
489- throw schema_exception ({ " invalid 6-bit value" }) ;
489+ throw schema_exception { { " invalid 6-bit value" } } ;
490490 }
491491
492492 return result;
@@ -548,7 +548,7 @@ response::IntType ModifiedArgument<response::IntType>::convert(const response::V
548548{
549549 if (value.type () != response::Type::Int)
550550 {
551- throw schema_exception ({ " not an integer" }) ;
551+ throw schema_exception { { " not an integer" } } ;
552552 }
553553
554554 return value.get <response::IntType>();
@@ -559,7 +559,7 @@ response::FloatType ModifiedArgument<response::FloatType>::convert(const respons
559559{
560560 if (value.type () != response::Type::Float)
561561 {
562- throw schema_exception ({ " not a float" }) ;
562+ throw schema_exception { { " not a float" } } ;
563563 }
564564
565565 return value.get <response::FloatType>();
@@ -570,7 +570,7 @@ response::StringType ModifiedArgument<response::StringType>::convert(const respo
570570{
571571 if (value.type () != response::Type::String)
572572 {
573- throw schema_exception ({ " not a string" }) ;
573+ throw schema_exception { { " not a string" } } ;
574574 }
575575
576576 return value.get <const response::StringType&>();
@@ -581,7 +581,7 @@ response::BooleanType ModifiedArgument<response::BooleanType>::convert(const res
581581{
582582 if (value.type () != response::Type::Boolean)
583583 {
584- throw schema_exception ({ " not a boolean" }) ;
584+ throw schema_exception { { " not a boolean" } } ;
585585 }
586586
587587 return value.get <response::BooleanType>();
@@ -592,7 +592,7 @@ response::Value ModifiedArgument<response::Value>::convert(const response::Value
592592{
593593 if (value.type () != response::Type::Map)
594594 {
595- throw schema_exception ({ " not an object" }) ;
595+ throw schema_exception { { " not an object" } } ;
596596 }
597597
598598 return response::Value (value);
@@ -603,7 +603,7 @@ response::IdType ModifiedArgument<response::IdType>::convert(const response::Val
603603{
604604 if (value.type () != response::Type::String)
605605 {
606- throw schema_exception ({ " not a string" }) ;
606+ throw schema_exception { { " not a string" } } ;
607607 }
608608
609609 const auto & encoded = value.get <const response::StringType&>();
@@ -806,7 +806,7 @@ void SelectionVisitor::visitField(const peg::ast_node & field)
806806 << " line: " << position.line
807807 << " column: " << position.byte_in_line ;
808808
809- throw schema_exception ({ error.str () }) ;
809+ throw schema_exception { { error.str () } } ;
810810 }
811811
812812 DirectiveVisitor directiveVisitor (_variables);
@@ -889,7 +889,7 @@ void SelectionVisitor::visitFragmentSpread(const peg::ast_node & fragmentSpread)
889889 << " line: " << position.line
890890 << " column: " << position.byte_in_line ;
891891
892- throw schema_exception ({ error.str () }) ;
892+ throw schema_exception { { error.str () } } ;
893893 }
894894
895895 bool skip = (_typeNames.count (itr->second .getType ()) == 0 );
@@ -1431,7 +1431,7 @@ void SubscriptionDefinitionVisitor::visitFragmentSpread(const peg::ast_node & fr
14311431 << " line: " << position.line
14321432 << " column: " << position.byte_in_line ;
14331433
1434- throw schema_exception ({ error.str () }) ;
1434+ throw schema_exception { { error.str () } } ;
14351435 }
14361436
14371437 bool skip = !_subscriptionObject->matchesType (itr->second .getType ());
@@ -1615,7 +1615,7 @@ std::future<response::Value> Request::resolve(std::launch launch, const std::sha
16151615 message << " name: " << operationName;
16161616 }
16171617
1618- throw schema_exception ({ message.str () }) ;
1618+ throw schema_exception { { message.str () } } ;
16191619 }
16201620 else if (operationDefinition.first == strSubscription)
16211621 {
@@ -1628,7 +1628,7 @@ std::future<response::Value> Request::resolve(std::launch launch, const std::sha
16281628 message << " name: " << operationName;
16291629 }
16301630
1631- throw schema_exception ({ message.str () }) ;
1631+ throw schema_exception { { message.str () } } ;
16321632 }
16331633
16341634 OperationDefinitionVisitor operationVisitor (state, _operations, std::move (variables), std::move (fragments));
@@ -1674,7 +1674,7 @@ SubscriptionKey Request::subscribe(SubscriptionParams && params, SubscriptionCal
16741674 message << " name: " << params.operationName ;
16751675 }
16761676
1677- throw schema_exception ({ message.str () }) ;
1677+ throw schema_exception { { message.str () } } ;
16781678 }
16791679 else if (operationDefinition.first != strSubscription)
16801680 {
@@ -1687,7 +1687,7 @@ SubscriptionKey Request::subscribe(SubscriptionParams && params, SubscriptionCal
16871687 message << " name: " << params.operationName ;
16881688 }
16891689
1690- throw schema_exception ({ message.str () }) ;
1690+ throw schema_exception { { message.str () } } ;
16911691 }
16921692
16931693 auto itr = _operations.find (std::string{ strSubscription });
0 commit comments