@@ -143,7 +143,7 @@ void ValueVisitor::visitVariable(const peg::ast_node & variable)
143
143
<< " line: " << position.line
144
144
<< " column: " << position.byte_in_line ;
145
145
146
- throw schema_exception ({ error.str () }) ;
146
+ throw schema_exception { { error.str () } } ;
147
147
}
148
148
149
149
_value = response::Value (itr->second );
@@ -304,7 +304,7 @@ bool DirectiveVisitor::shouldSkip() const
304
304
305
305
error << " Invalid arguments to directive: " << entry.second ;
306
306
307
- throw schema_exception ({ error.str () }) ;
307
+ throw schema_exception { { error.str () } } ;
308
308
}
309
309
310
310
bool argumentTrue = false ;
@@ -322,7 +322,7 @@ bool DirectiveVisitor::shouldSkip() const
322
322
error << " Invalid argument to directive: " << entry.second
323
323
<< " name: " << argument.first ;
324
324
325
- throw schema_exception ({ error.str () }) ;
325
+ throw schema_exception { { error.str () } } ;
326
326
}
327
327
328
328
argumentTrue = argument.second .get <response::BooleanType>();
@@ -344,7 +344,7 @@ bool DirectiveVisitor::shouldSkip() const
344
344
error << " Missing argument to directive: " << entry.second
345
345
<< " name: if" ;
346
346
347
- throw schema_exception ({ error.str () }) ;
347
+ throw schema_exception { { error.str () } } ;
348
348
}
349
349
}
350
350
@@ -399,7 +399,7 @@ uint8_t Base64::verifyFromBase64(char ch)
399
399
400
400
if (result > 63 )
401
401
{
402
- throw schema_exception ({ " invalid character in base64 encoded string" }) ;
402
+ throw schema_exception { { " invalid character in base64 encoded string" } } ;
403
403
}
404
404
405
405
return result;
@@ -446,7 +446,7 @@ std::vector<uint8_t> Base64::fromBase64(const char* encoded, size_t count)
446
446
{
447
447
if (tail & 0x3 )
448
448
{
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" } } ;
450
450
}
451
451
452
452
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)
459
459
{
460
460
if (segment & 0xFF )
461
461
{
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" } } ;
463
463
}
464
464
465
465
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)
474
474
|| (count > 1 && padding != encoded[1 ])
475
475
|| count > 2 )
476
476
{
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" } } ;
478
478
}
479
479
480
480
return result;
@@ -486,7 +486,7 @@ char Base64::verifyToBase64(uint8_t i)
486
486
487
487
if (result == padding)
488
488
{
489
- throw schema_exception ({ " invalid 6-bit value" }) ;
489
+ throw schema_exception { { " invalid 6-bit value" } } ;
490
490
}
491
491
492
492
return result;
@@ -548,7 +548,7 @@ response::IntType ModifiedArgument<response::IntType>::convert(const response::V
548
548
{
549
549
if (value.type () != response::Type::Int)
550
550
{
551
- throw schema_exception ({ " not an integer" }) ;
551
+ throw schema_exception { { " not an integer" } } ;
552
552
}
553
553
554
554
return value.get <response::IntType>();
@@ -559,7 +559,7 @@ response::FloatType ModifiedArgument<response::FloatType>::convert(const respons
559
559
{
560
560
if (value.type () != response::Type::Float)
561
561
{
562
- throw schema_exception ({ " not a float" }) ;
562
+ throw schema_exception { { " not a float" } } ;
563
563
}
564
564
565
565
return value.get <response::FloatType>();
@@ -570,7 +570,7 @@ response::StringType ModifiedArgument<response::StringType>::convert(const respo
570
570
{
571
571
if (value.type () != response::Type::String)
572
572
{
573
- throw schema_exception ({ " not a string" }) ;
573
+ throw schema_exception { { " not a string" } } ;
574
574
}
575
575
576
576
return value.get <const response::StringType&>();
@@ -581,7 +581,7 @@ response::BooleanType ModifiedArgument<response::BooleanType>::convert(const res
581
581
{
582
582
if (value.type () != response::Type::Boolean)
583
583
{
584
- throw schema_exception ({ " not a boolean" }) ;
584
+ throw schema_exception { { " not a boolean" } } ;
585
585
}
586
586
587
587
return value.get <response::BooleanType>();
@@ -592,7 +592,7 @@ response::Value ModifiedArgument<response::Value>::convert(const response::Value
592
592
{
593
593
if (value.type () != response::Type::Map)
594
594
{
595
- throw schema_exception ({ " not an object" }) ;
595
+ throw schema_exception { { " not an object" } } ;
596
596
}
597
597
598
598
return response::Value (value);
@@ -603,7 +603,7 @@ response::IdType ModifiedArgument<response::IdType>::convert(const response::Val
603
603
{
604
604
if (value.type () != response::Type::String)
605
605
{
606
- throw schema_exception ({ " not a string" }) ;
606
+ throw schema_exception { { " not a string" } } ;
607
607
}
608
608
609
609
const auto & encoded = value.get <const response::StringType&>();
@@ -806,7 +806,7 @@ void SelectionVisitor::visitField(const peg::ast_node & field)
806
806
<< " line: " << position.line
807
807
<< " column: " << position.byte_in_line ;
808
808
809
- throw schema_exception ({ error.str () }) ;
809
+ throw schema_exception { { error.str () } } ;
810
810
}
811
811
812
812
DirectiveVisitor directiveVisitor (_variables);
@@ -889,7 +889,7 @@ void SelectionVisitor::visitFragmentSpread(const peg::ast_node & fragmentSpread)
889
889
<< " line: " << position.line
890
890
<< " column: " << position.byte_in_line ;
891
891
892
- throw schema_exception ({ error.str () }) ;
892
+ throw schema_exception { { error.str () } } ;
893
893
}
894
894
895
895
bool skip = (_typeNames.count (itr->second .getType ()) == 0 );
@@ -1431,7 +1431,7 @@ void SubscriptionDefinitionVisitor::visitFragmentSpread(const peg::ast_node & fr
1431
1431
<< " line: " << position.line
1432
1432
<< " column: " << position.byte_in_line ;
1433
1433
1434
- throw schema_exception ({ error.str () }) ;
1434
+ throw schema_exception { { error.str () } } ;
1435
1435
}
1436
1436
1437
1437
bool skip = !_subscriptionObject->matchesType (itr->second .getType ());
@@ -1615,7 +1615,7 @@ std::future<response::Value> Request::resolve(std::launch launch, const std::sha
1615
1615
message << " name: " << operationName;
1616
1616
}
1617
1617
1618
- throw schema_exception ({ message.str () }) ;
1618
+ throw schema_exception { { message.str () } } ;
1619
1619
}
1620
1620
else if (operationDefinition.first == strSubscription)
1621
1621
{
@@ -1628,7 +1628,7 @@ std::future<response::Value> Request::resolve(std::launch launch, const std::sha
1628
1628
message << " name: " << operationName;
1629
1629
}
1630
1630
1631
- throw schema_exception ({ message.str () }) ;
1631
+ throw schema_exception { { message.str () } } ;
1632
1632
}
1633
1633
1634
1634
OperationDefinitionVisitor operationVisitor (state, _operations, std::move (variables), std::move (fragments));
@@ -1674,7 +1674,7 @@ SubscriptionKey Request::subscribe(SubscriptionParams && params, SubscriptionCal
1674
1674
message << " name: " << params.operationName ;
1675
1675
}
1676
1676
1677
- throw schema_exception ({ message.str () }) ;
1677
+ throw schema_exception { { message.str () } } ;
1678
1678
}
1679
1679
else if (operationDefinition.first != strSubscription)
1680
1680
{
@@ -1687,7 +1687,7 @@ SubscriptionKey Request::subscribe(SubscriptionParams && params, SubscriptionCal
1687
1687
message << " name: " << params.operationName ;
1688
1688
}
1689
1689
1690
- throw schema_exception ({ message.str () }) ;
1690
+ throw schema_exception { { message.str () } } ;
1691
1691
}
1692
1692
1693
1693
auto itr = _operations.find (std::string{ strSubscription });
0 commit comments