MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / processParametersBlock

Method processParametersBlock

src/common/IntlParametersBlock.cpp:124–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123
124void IntlParametersBlock::processParametersBlock(ProcessString* processString, ClumpletWriter& pb)
125{
126 const char* tagName = NULL;
127 try
128 {
129 for (pb.rewind(); !pb.isEof(); )
130 {
131 UCHAR tag = pb.getClumpTag();
132 string s;
133
134 tagName = NULL;
135 switch (checkTag(tag, &tagName))
136 {
137 case TAG_SKIP:
138 pb.moveNext();
139 break;
140
141 case TAG_STRING:
142 pb.getString(s);
143 processString(s);
144 pb.deleteClumplet();
145 pb.insertString(tag, s);
146 break;
147
148 case TAG_COMMAND_LINE:
149 pb.getString(s);
150 processCommandLine(processString, s);
151 pb.deleteClumplet();
152 pb.insertString(tag, s);
153 break;
154 }
155 }
156 }
157 catch (const Firebird::status_exception& st)
158 {
159 LocalStatus ls;
160 CheckStatusWrapper l(&ls);
161 st.stuffException(&l);
162 if ((l.getState() & IStatus::STATE_ERRORS) && (l.getErrors()[1] == isc_bad_conn_str) && tagName)
163 {
164 Arg::Gds newErrors(isc_intl_char);
165 newErrors << tagName;
166
167 const ISC_STATUS* errors = l.getErrors();
168 newErrors << Arg::StatusVector(errors + 2); // skip isc_bad_conn_str
169
170 l.setErrors(newErrors.value());
171 status_exception::raise(&l);
172 }
173
174 // other case leave exception as is
175 throw;
176 }
177}
178
179
180#define FB_IPB_TAG(t) case t: if (!*tagName) *tagName = #t

Callers

nothing calls this directly

Calls 15

processCommandLineFunction · 0.85
raiseFunction · 0.85
getClumpTagMethod · 0.80
deleteClumpletMethod · 0.80
StatusVectorClass · 0.70
rewindMethod · 0.45
isEofMethod · 0.45
moveNextMethod · 0.45
getStringMethod · 0.45
insertStringMethod · 0.45
stuffExceptionMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected