Skip to content

Commit 006e46f

Browse files
committed
Put back error messages on missing getter static_asserts
1 parent d735105 commit 006e46f

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

samples/learn/DroidObject.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Droid
127127
}
128128
else
129129
{
130-
static_assert(methods::DroidMethod::NoParamsId<T>);
130+
static_assert(methods::DroidMethod::NoParamsId<T>, R"msg(Droid::getId is not implemented)msg");
131131
return { _pimpl->getId() };
132132
}
133133
}
@@ -140,7 +140,7 @@ class Droid
140140
}
141141
else
142142
{
143-
static_assert(methods::DroidMethod::NoParamsName<T>);
143+
static_assert(methods::DroidMethod::NoParamsName<T>, R"msg(Droid::getName is not implemented)msg");
144144
return { _pimpl->getName() };
145145
}
146146
}
@@ -153,7 +153,7 @@ class Droid
153153
}
154154
else
155155
{
156-
static_assert(methods::DroidMethod::NoParamsFriends<T>);
156+
static_assert(methods::DroidMethod::NoParamsFriends<T>, R"msg(Droid::getFriends is not implemented)msg");
157157
return { _pimpl->getFriends() };
158158
}
159159
}
@@ -166,7 +166,7 @@ class Droid
166166
}
167167
else
168168
{
169-
static_assert(methods::DroidMethod::NoParamsAppearsIn<T>);
169+
static_assert(methods::DroidMethod::NoParamsAppearsIn<T>, R"msg(Droid::getAppearsIn is not implemented)msg");
170170
return { _pimpl->getAppearsIn() };
171171
}
172172
}
@@ -179,7 +179,7 @@ class Droid
179179
}
180180
else
181181
{
182-
static_assert(methods::DroidMethod::NoParamsPrimaryFunction<T>);
182+
static_assert(methods::DroidMethod::NoParamsPrimaryFunction<T>, R"msg(Droid::getPrimaryFunction is not implemented)msg");
183183
return { _pimpl->getPrimaryFunction() };
184184
}
185185
}

samples/learn/HumanObject.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Human
127127
}
128128
else
129129
{
130-
static_assert(methods::HumanMethod::NoParamsId<T>);
130+
static_assert(methods::HumanMethod::NoParamsId<T>, R"msg(Human::getId is not implemented)msg");
131131
return { _pimpl->getId() };
132132
}
133133
}
@@ -140,7 +140,7 @@ class Human
140140
}
141141
else
142142
{
143-
static_assert(methods::HumanMethod::NoParamsName<T>);
143+
static_assert(methods::HumanMethod::NoParamsName<T>, R"msg(Human::getName is not implemented)msg");
144144
return { _pimpl->getName() };
145145
}
146146
}
@@ -153,7 +153,7 @@ class Human
153153
}
154154
else
155155
{
156-
static_assert(methods::HumanMethod::NoParamsFriends<T>);
156+
static_assert(methods::HumanMethod::NoParamsFriends<T>, R"msg(Human::getFriends is not implemented)msg");
157157
return { _pimpl->getFriends() };
158158
}
159159
}
@@ -166,7 +166,7 @@ class Human
166166
}
167167
else
168168
{
169-
static_assert(methods::HumanMethod::NoParamsAppearsIn<T>);
169+
static_assert(methods::HumanMethod::NoParamsAppearsIn<T>, R"msg(Human::getAppearsIn is not implemented)msg");
170170
return { _pimpl->getAppearsIn() };
171171
}
172172
}
@@ -179,7 +179,7 @@ class Human
179179
}
180180
else
181181
{
182-
static_assert(methods::HumanMethod::NoParamsHomePlanet<T>);
182+
static_assert(methods::HumanMethod::NoParamsHomePlanet<T>, R"msg(Human::getHomePlanet is not implemented)msg");
183183
return { _pimpl->getHomePlanet() };
184184
}
185185
}

samples/learn/MutationObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Mutation
7474
}
7575
else
7676
{
77-
static_assert(methods::MutationMethod::NoParamsCreateReview<T>);
77+
static_assert(methods::MutationMethod::NoParamsCreateReview<T>, R"msg(Mutation::applyCreateReview is not implemented)msg");
7878
return { _pimpl->applyCreateReview(std::move(epArg), std::move(reviewArg)) };
7979
}
8080
}

samples/learn/QueryObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Query
106106
}
107107
else
108108
{
109-
static_assert(methods::QueryMethod::NoParamsHero<T>);
109+
static_assert(methods::QueryMethod::NoParamsHero<T>, R"msg(Query::getHero is not implemented)msg");
110110
return { _pimpl->getHero(std::move(episodeArg)) };
111111
}
112112
}
@@ -119,7 +119,7 @@ class Query
119119
}
120120
else
121121
{
122-
static_assert(methods::QueryMethod::NoParamsHuman<T>);
122+
static_assert(methods::QueryMethod::NoParamsHuman<T>, R"msg(Query::getHuman is not implemented)msg");
123123
return { _pimpl->getHuman(std::move(idArg)) };
124124
}
125125
}
@@ -132,7 +132,7 @@ class Query
132132
}
133133
else
134134
{
135-
static_assert(methods::QueryMethod::NoParamsDroid<T>);
135+
static_assert(methods::QueryMethod::NoParamsDroid<T>, R"msg(Query::getDroid is not implemented)msg");
136136
return { _pimpl->getDroid(std::move(idArg)) };
137137
}
138138
}

samples/learn/ReviewObject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Review
8888
}
8989
else
9090
{
91-
static_assert(methods::ReviewMethod::NoParamsStars<T>);
91+
static_assert(methods::ReviewMethod::NoParamsStars<T>, R"msg(Review::getStars is not implemented)msg");
9292
return { _pimpl->getStars() };
9393
}
9494
}
@@ -101,7 +101,7 @@ class Review
101101
}
102102
else
103103
{
104-
static_assert(methods::ReviewMethod::NoParamsCommentary<T>);
104+
static_assert(methods::ReviewMethod::NoParamsCommentary<T>, R"msg(Review::getCommentary is not implemented)msg");
105105
return { _pimpl->getCommentary() };
106106
}
107107
}

src/SchemaGenerator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ void Generator::outputObjectDeclaration(
806806
{
807807
static_assert(methods::)cpp"
808808
<< objectType.cppType << R"cpp(Method::NoParams)cpp" << fieldName
809-
<< R"cpp(<T>);)cpp";
809+
<< R"cpp(<T>, R"msg()cpp" << objectType.cppType << R"cpp(::)cpp"
810+
<< outputField.accessor << fieldName
811+
<< R"cpp( is not implemented)msg");)cpp";
810812
}
811813
else
812814
{

0 commit comments

Comments
 (0)