MCPcopy Index your code
hub / github.com/simstudioai/sim / readException

Method readException

apps/sim/app/api/tools/evernote/lib/thrift.ts:239–252  ·  view source on GitHub ↗

Read a Thrift application exception

()

Source from the content-addressed store, hash-verified

237
238 /** Read a Thrift application exception */
239 readException(): { message: string; type: number } {
240 let message = ''
241 let type = 0
242 this.readStruct((reader, fieldId, fieldType) => {
243 if (fieldId === 1 && fieldType === TYPE_STRING) {
244 message = reader.readString()
245 } else if (fieldId === 2 && fieldType === TYPE_I32) {
246 type = reader.readI32()
247 } else {
248 reader.skip(fieldType)
249 }
250 })
251 return { message, type }
252 }
253}
254
255export { TYPE_BOOL, TYPE_I32, TYPE_I64, TYPE_LIST, TYPE_STRING, TYPE_STRUCT }

Callers 2

callNoteStoreFunction · 0.95
callNoteStoreFunction · 0.95

Calls 4

readStructMethod · 0.95
readStringMethod · 0.80
readI32Method · 0.80
skipMethod · 0.80

Tested by

no test coverage detected