MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / readEDAMSystemException

Function readEDAMSystemException

qevercloud/exceptions.cpp:155–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void readEDAMSystemException(ThriftBinaryBufferReader& r, EDAMSystemException& e)
156{
157 QString name;
158 ThriftFieldType::type fieldType;
159 qint16 fieldId;
160 bool errorCode_isset = false;
161 r.readStructBegin(name);
162 while(true) {
163 r.readFieldBegin(name, fieldType, fieldId);
164 if(fieldType == ThriftFieldType::T_STOP) break;
165 switch(fieldId) {
166 case 2:
167 if(fieldType == ThriftFieldType::T_STRING) {
168 QString str;
169 r.readString(str);
170 e.message = str;
171 } else {
172 r.skip(fieldType);
173 }
174 break;
175 case 1:
176 if(fieldType == ThriftFieldType::T_I32) {
177 qint32 t;
178 r.readI32(t);
179 e.errorCode = static_cast<EDAMErrorCode::type>(t);
180 errorCode_isset = true;
181 } else {
182 r.skip(fieldType);
183 }
184 break;
185 case 3:
186 if(fieldType == ThriftFieldType::T_I32) {
187 qint32 t;
188 r.readI32(t);
189 e.rateLimitDuration = t;
190 errorCode_isset = true;
191 } else {
192 r.skip(fieldType);
193 }
194 break;
195 default:
196 r.skip(fieldType);
197 }
198 r.readFieldEnd();
199 }
200 r.readStructEnd();
201 if(!errorCode_isset) throw ThriftException(ThriftException::Type::INVALID_DATA, QStringLiteral("EDAMSystemException.errorCode has no value"));
202}
203
204void readEDAMNotFoundException(ThriftBinaryBufferReader& r, EDAMNotFoundException& e)
205{

Calls 8

ThriftExceptionClass · 0.85
readStructBeginMethod · 0.80
readFieldBeginMethod · 0.80
readStringMethod · 0.80
skipMethod · 0.80
readI32Method · 0.80
readFieldEndMethod · 0.80
readStructEndMethod · 0.80

Tested by

no test coverage detected