@@ -4200,10 +4200,11 @@ AuthorityFactory::createObject(const std::string &code) const {
4200
4200
4201
4201
// ! @cond Doxygen_Suppress
4202
4202
static FactoryException buildFactoryException (const char *type,
4203
+ const std::string &authName,
4203
4204
const std::string &code,
4204
4205
const std::exception &ex) {
4205
- return FactoryException (std::string (" cannot build " ) + type + " " + code +
4206
- " : " + ex.what ());
4206
+ return FactoryException (std::string (" cannot build " ) + type + " " +
4207
+ authName + " : " + code + " : " + ex.what ());
4207
4208
}
4208
4209
// ! @endcond
4209
4210
@@ -4258,7 +4259,7 @@ AuthorityFactory::createExtent(const std::string &code) const {
4258
4259
return extent;
4259
4260
4260
4261
} catch (const std::exception &ex) {
4261
- throw buildFactoryException (" extent" , code, ex);
4262
+ throw buildFactoryException (" extent" , d-> authority (), code, ex);
4262
4263
}
4263
4264
}
4264
4265
@@ -4323,7 +4324,8 @@ AuthorityFactory::createUnitOfMeasure(const std::string &code) const {
4323
4324
d->context ()->d ->cache (cacheKey, uom);
4324
4325
return uom;
4325
4326
} catch (const std::exception &ex) {
4326
- throw buildFactoryException (" unit of measure" , code, ex);
4327
+ throw buildFactoryException (" unit of measure" , d->authority (), code,
4328
+ ex);
4327
4329
}
4328
4330
}
4329
4331
@@ -4410,7 +4412,7 @@ AuthorityFactory::createPrimeMeridian(const std::string &code) const {
4410
4412
d->context ()->d ->cache (cacheKey, pm);
4411
4413
return pm;
4412
4414
} catch (const std::exception &ex) {
4413
- throw buildFactoryException (" prime meridian" , code, ex);
4415
+ throw buildFactoryException (" prime meridian" , d-> authority (), code, ex);
4414
4416
}
4415
4417
}
4416
4418
@@ -4509,7 +4511,7 @@ AuthorityFactory::createEllipsoid(const std::string &code) const {
4509
4511
return ellps;
4510
4512
}
4511
4513
} catch (const std::exception &ex) {
4512
- throw buildFactoryException (" ellipsoid" , code, ex);
4514
+ throw buildFactoryException (" ellipsoid" , d-> authority (), code, ex);
4513
4515
}
4514
4516
}
4515
4517
@@ -4634,7 +4636,8 @@ void AuthorityFactory::createGeodeticDatumOrEnsemble(
4634
4636
outDatum = datum.as_nullable ();
4635
4637
}
4636
4638
} catch (const std::exception &ex) {
4637
- throw buildFactoryException (" geodetic reference frame" , code, ex);
4639
+ throw buildFactoryException (" geodetic reference frame" , d->authority (),
4640
+ code, ex);
4638
4641
}
4639
4642
}
4640
4643
@@ -4727,7 +4730,8 @@ void AuthorityFactory::createVerticalDatumOrEnsemble(
4727
4730
}
4728
4731
}
4729
4732
} catch (const std::exception &ex) {
4730
- throw buildFactoryException (" vertical reference frame" , code, ex);
4733
+ throw buildFactoryException (" vertical reference frame" , d->authority (),
4734
+ code, ex);
4731
4735
}
4732
4736
}
4733
4737
@@ -5131,7 +5135,7 @@ AuthorityFactory::createGeodeticCRS(const std::string &code,
5131
5135
throw FactoryException (" unsupported (type, CS type) for geodeticCRS: " +
5132
5136
type + " , " + cs->getWKT2Type (true ));
5133
5137
} catch (const std::exception &ex) {
5134
- throw buildFactoryException (" geodeticCRS" , code, ex);
5138
+ throw buildFactoryException (" geodeticCRS" , d-> authority (), code, ex);
5135
5139
}
5136
5140
}
5137
5141
@@ -5196,7 +5200,7 @@ AuthorityFactory::createVerticalCRS(const std::string &code) const {
5196
5200
throw FactoryException (" unsupported CS type for verticalCRS: " +
5197
5201
cs->getWKT2Type (true ));
5198
5202
} catch (const std::exception &ex) {
5199
- throw buildFactoryException (" verticalCRS" , code, ex);
5203
+ throw buildFactoryException (" verticalCRS" , d-> authority (), code, ex);
5200
5204
}
5201
5205
}
5202
5206
@@ -5312,7 +5316,7 @@ AuthorityFactory::createConversion(const std::string &code) const {
5312
5316
return operation::Conversion::create (propConversion, propMethod,
5313
5317
parameters, values);
5314
5318
} catch (const std::exception &ex) {
5315
- throw buildFactoryException (" conversion" , code, ex);
5319
+ throw buildFactoryException (" conversion" , d-> authority (), code, ex);
5316
5320
}
5317
5321
}
5318
5322
@@ -5450,7 +5454,7 @@ AuthorityFactory::Private::createProjectedCRSEnd(const std::string &code,
5450
5454
throw FactoryException (" unsupported CS type for projectedCRS: " +
5451
5455
cs->getWKT2Type (true ));
5452
5456
} catch (const std::exception &ex) {
5453
- throw buildFactoryException (" projectedCRS" , code, ex);
5457
+ throw buildFactoryException (" projectedCRS" , authority (), code, ex);
5454
5458
}
5455
5459
}
5456
5460
// ! @endcond
@@ -5497,7 +5501,7 @@ AuthorityFactory::createCompoundCRS(const std::string &code) const {
5497
5501
return crs::CompoundCRS::create (
5498
5502
props, std::vector<crs::CRSNNPtr>{horizCRS, vertCRS});
5499
5503
} catch (const std::exception &ex) {
5500
- throw buildFactoryException (" compoundCRS" , code, ex);
5504
+ throw buildFactoryException (" compoundCRS" , d-> authority (), code, ex);
5501
5505
}
5502
5506
}
5503
5507
@@ -5935,7 +5939,8 @@ operation::CoordinateOperationNNPtr AuthorityFactory::createCoordinateOperation(
5935
5939
values, accuracies);
5936
5940
5937
5941
} catch (const std::exception &ex) {
5938
- throw buildFactoryException (" transformation" , code, ex);
5942
+ throw buildFactoryException (" transformation" , d->authority (), code,
5943
+ ex);
5939
5944
}
5940
5945
}
5941
5946
@@ -6050,7 +6055,8 @@ operation::CoordinateOperationNNPtr AuthorityFactory::createCoordinateOperation(
6050
6055
return transf;
6051
6056
6052
6057
} catch (const std::exception &ex) {
6053
- throw buildFactoryException (" transformation" , code, ex);
6058
+ throw buildFactoryException (" transformation" , d->authority (), code,
6059
+ ex);
6054
6060
}
6055
6061
}
6056
6062
@@ -6202,7 +6208,8 @@ operation::CoordinateOperationNNPtr AuthorityFactory::createCoordinateOperation(
6202
6208
parameters, values, accuracies);
6203
6209
6204
6210
} catch (const std::exception &ex) {
6205
- throw buildFactoryException (" transformation" , code, ex);
6211
+ throw buildFactoryException (" transformation" , d->authority (), code,
6212
+ ex);
6206
6213
}
6207
6214
}
6208
6215
@@ -6306,7 +6313,8 @@ operation::CoordinateOperationNNPtr AuthorityFactory::createCoordinateOperation(
6306
6313
accuracies);
6307
6314
6308
6315
} catch (const std::exception &ex) {
6309
- throw buildFactoryException (" transformation" , code, ex);
6316
+ throw buildFactoryException (" transformation" , d->authority (), code,
6317
+ ex);
6310
6318
}
6311
6319
}
6312
6320
0 commit comments