Skip to content

Commit 7583e98

Browse files
authored
Remove new lines from error messages and typo fixes
Fixes #14174
1 parent c4efc3e commit 7583e98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+266
-279
lines changed

apps/gdalwarp_bin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ MAIN_START(argc, argv)
133133
sOptionsForBinary.bOverwrite)
134134
{
135135
CPLError(CE_Failure, CPLE_IllegalArg,
136-
"Source and destination datasets must be different.\n");
136+
"Source and destination datasets must be different.");
137137
GDALExit(1);
138138
}
139139

apps/nearblack_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ GDALDatasetH CPL_DLL GDALNearblack(const char *pszDest, GDALDatasetH hDstDS,
282282
{
283283
CPLError(CE_Failure, CPLE_AppDefined,
284284
"-color args must have the same number of values as "
285-
"the non alpha input band count.\n");
285+
"the non alpha input band count.");
286286
if (bCloseOutDSOnError)
287287
GDALClose(hDstDS);
288288
return nullptr;

autotest/gdrivers/derived.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_derived_test3():
142142
gdal.Open("DERIVED_SUBDATASET:LOGAMPLITUDE:dataset_does_not_exist")
143143

144144
with pytest.raises(Exception):
145-
# Raster with zero band
145+
# Raster with zero bands
146146
gdal.Open("DERIVED_SUBDATASET:LOGAMPLITUDE:data/hdf5/CSK_DGM.h5")
147147

148148

frmts/bsb/bsbdataset.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ static int BSBIsSRSOK(const char *pszWKT)
919919
if (!bOK)
920920
{
921921
CPLError(CE_Warning, CPLE_NotSupported,
922-
"BSB only supports WGS84 or NAD83 geographic projections.\n");
922+
"BSB only supports WGS84 or NAD83 geographic projections.");
923923
}
924924

925925
return bOK;
@@ -942,7 +942,7 @@ static GDALDataset *BSBCreateCopy(const char *pszFilename, GDALDataset *poSrcDS,
942942
if (nBands != 1)
943943
{
944944
CPLError(CE_Failure, CPLE_NotSupported,
945-
"BSB driver only supports one band images.\n");
945+
"BSB driver only supports one band images.");
946946

947947
return NULL;
948948
}

frmts/cosar/cosar_dataset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ CPLErr COSARRasterBand::IReadBlock(int /*nBlockXOff*/, int nBlockYOff,
101101
{
102102
/* throw an error */
103103
CPLError(CE_Failure, CPLE_AppDefined,
104-
"RSLV/RSFV values are not sane... oh dear.\n");
104+
"RSLV/RSFV values are not sane... oh dear.");
105105
return CE_Failure;
106106
}
107107

frmts/dted/dteddataset.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,14 +672,14 @@ static GDALDataset *DTEDCreateCopy(const char *pszFilename,
672672
{
673673
CPLError(
674674
CE_Failure, CPLE_NotSupported,
675-
"DTED driver does not support source dataset with zero band.\n");
675+
"DTED driver does not support source datasets with zero bands.");
676676
return nullptr;
677677
}
678678

679679
if (nBands != 1)
680680
{
681681
CPLError((bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,
682-
"DTED driver only uses the first band of the dataset.\n");
682+
"DTED driver only uses the first band of the dataset.");
683683
if (bStrict)
684684
return nullptr;
685685
}

frmts/ecw/ecwcreatecopy.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ CPLErr GDALECWCompressor::Initialize(
722722
if (gt.xrot != 0.0 || gt.yrot != 0.0)
723723
CPLError(CE_Warning, CPLE_NotSupported,
724724
"Rotational coefficients ignored, georeferencing of\n"
725-
"output ECW file will be incorrect.\n");
725+
"output ECW file will be incorrect.");
726726
else
727727
{
728728
psClient->fOriginX = gt.xorig;
@@ -1102,7 +1102,7 @@ static GDALDataset *ECWCreateCopy(const char *pszFilename, GDALDataset *poSrcDS,
11021102
{
11031103
CPLError(
11041104
CE_Failure, CPLE_NotSupported,
1105-
"ECW driver does not support source dataset with zero band.\n");
1105+
"ECW driver does not support source datasets with zero bands.");
11061106
return nullptr;
11071107
}
11081108

@@ -1163,7 +1163,7 @@ static GDALDataset *ECWCreateCopy(const char *pszFilename, GDALDataset *poSrcDS,
11631163
"ECW version 2 does not support UInt16 data type, "
11641164
"truncating to Byte."
11651165
" Consider specifying ECW_FORMAT_VERSION=3 for full "
1166-
"UInt16 support available in ECW version 3. \n");
1166+
"UInt16 support available in ECW version 3. ");
11671167
}
11681168
else
11691169
#endif
@@ -1299,7 +1299,7 @@ GDALDataset *ECWCreateCopyECW(const char *pszFilename, GDALDataset *poSrcDS,
12991299
{
13001300
CPLError(
13011301
CE_Failure, CPLE_NotSupported,
1302-
"ECW driver does not support source dataset with zero band.\n");
1302+
"ECW driver does not support source datasets with zero bands.");
13031303
return nullptr;
13041304
}
13051305

@@ -1335,7 +1335,7 @@ GDALDataset *ECWCreateCopyECW(const char *pszFilename, GDALDataset *poSrcDS,
13351335
CPLError(CE_Failure, CPLE_NotSupported,
13361336
"ECW v2 does not support UInt16 data type. Consider "
13371337
" specifying ECW_FORMAT_VERSION=3 for full UInt16 support "
1338-
"available in ECW v3. \n");
1338+
"available in ECW v3. ");
13391339
}
13401340
else
13411341
#endif
@@ -1369,7 +1369,7 @@ GDALDataset *ECWCreateCopyECW(const char *pszFilename, GDALDataset *poSrcDS,
13691369
"ECW driver ignores color table. "
13701370
"The source raster band will be considered as grey level.\n"
13711371
"Consider using color table expansion (-expand option in "
1372-
"gdal_translate)\n");
1372+
"gdal_translate)");
13731373
if (bStrict)
13741374
return nullptr;
13751375
}
@@ -1394,7 +1394,7 @@ GDALDataset *ECWCreateCopyJPEG2000(const char *pszFilename,
13941394
{
13951395
CPLError(
13961396
CE_Failure, CPLE_NotSupported,
1397-
"JP2ECW driver does not support source dataset with zero band.\n");
1397+
"JP2ECW driver does not support source datasets with zero bands.");
13981398
return nullptr;
13991399
}
14001400

@@ -1428,7 +1428,7 @@ GDALDataset *ECWCreateCopyJPEG2000(const char *pszFilename,
14281428
"JP2ECW driver ignores color table. "
14291429
"The source raster band will be considered as grey level.\n"
14301430
"Consider using color table expansion (-expand option in "
1431-
"gdal_translate)\n");
1431+
"gdal_translate)");
14321432
if (bStrict)
14331433
return nullptr;
14341434
}

frmts/georaster/georaster_dataset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ GDALDataset *GeoRasterDataset::CreateCopy(const char *pszFilename,
14931493
{
14941494
CPLError(CE_Failure, CPLE_NotSupported,
14951495
"GeoRaster driver does not support source dataset with zero "
1496-
"band.\n");
1496+
"band.");
14971497
return nullptr;
14981498
}
14991499

frmts/georaster/oci_wrapper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,19 +1896,19 @@ bool CheckError(sword nStatus, OCIError *hError)
18961896
return false;
18971897
break;
18981898
case OCI_NEED_DATA:
1899-
CPLError(CE_Failure, CPLE_AppDefined, "OCI_NEED_DATA\n");
1899+
CPLError(CE_Failure, CPLE_AppDefined, "OCI_NEED_DATA");
19001900
break;
19011901
case OCI_NO_DATA:
1902-
CPLError(CE_Failure, CPLE_AppDefined, "OCI_NODATA\n");
1902+
CPLError(CE_Failure, CPLE_AppDefined, "OCI_NODATA");
19031903
break;
19041904
case OCI_INVALID_HANDLE:
19051905
CPLError(CE_Failure, CPLE_AppDefined, "OCI_INVALID_HANDLE");
19061906
break;
19071907
case OCI_STILL_EXECUTING:
1908-
CPLError(CE_Failure, CPLE_AppDefined, "OCI_STILL_EXECUTE\n");
1908+
CPLError(CE_Failure, CPLE_AppDefined, "OCI_STILL_EXECUTE");
19091909
break;
19101910
case OCI_CONTINUE:
1911-
CPLError(CE_Failure, CPLE_AppDefined, "OCI_CONTINUE\n");
1911+
CPLError(CE_Failure, CPLE_AppDefined, "OCI_CONTINUE");
19121912
break;
19131913
case OCI_ERROR:
19141914

frmts/gif/biggifdataset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ CPLErr BIGGIFDataset::ReOpen()
240240
if (hGifFile == nullptr)
241241
{
242242
CPLError(CE_Failure, CPLE_OpenFailed,
243-
"DGifOpen() failed. Perhaps the gif file is corrupt?\n");
243+
"DGifOpen() failed. Perhaps the gif file is corrupt?");
244244

245245
return CE_Failure;
246246
}

0 commit comments

Comments
 (0)