Skip to content

Commit

Permalink
Distinguish the 4 cases of "An error occurred while writing a dirty b…
Browse files Browse the repository at this point in the history
…lock"

When running into a failure on a large remote job, it's hard to tell from
the logs which of the 4 cases was being triggered.

git-svn-id: https://svn.osgeo.org/gdal/trunk@41780 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
schwehr committed Mar 13, 2018
1 parent 5e42450 commit 9d075b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 9 additions & 6 deletions gdal/gcore/gdalrasterband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ CPLErr GDALRasterBand::RasterIO( GDALRWFlag eRWFlag,

if( eRWFlag == GF_Write && eFlushBlockErr != CE_None )
{
ReportError( eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block");
ReportError(eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block "
"from GDALRasterBand::RasterIO");
CPLErr eErr = eFlushBlockErr;
eFlushBlockErr = CE_None;
return eErr;
Expand Down Expand Up @@ -705,8 +706,9 @@ CPLErr GDALRasterBand::WriteBlock( int nXBlockOff, int nYBlockOff,

if( eFlushBlockErr != CE_None )
{
ReportError( eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block");
ReportError(eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block "
"from GDALRasterBand::WriteBlock");
CPLErr eErr = eFlushBlockErr;
eFlushBlockErr = CE_None;
return eErr;
Expand Down Expand Up @@ -1034,8 +1036,9 @@ CPLErr GDALRasterBand::FlushCache()

if (eFlushBlockErr != CE_None)
{
ReportError( eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block");
ReportError(
eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block from FlushCache");
eFlushBlockErr = CE_None;
}

Expand Down
5 changes: 3 additions & 2 deletions gdal/gcore/rasterio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ CPLErr GDALRasterBand::IRasterIO( GDALRWFlag eRWFlag,
{
if( eRWFlag == GF_Write && eFlushBlockErr != CE_None )
{
CPLError( eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block" );
CPLError(eFlushBlockErr, CPLE_AppDefined,
"An error occurred while writing a dirty block "
"from GDALRasterBand::IRasterIO");
CPLErr eErr = eFlushBlockErr;
eFlushBlockErr = CE_None;
return eErr;
Expand Down

0 comments on commit 9d075b6

Please sign in to comment.