[Gdal-dev] return from sdedataset.cpp
Howard Butler
hobu.inc at gmail.com
Tue Sep 25 16:23:36 EDT 2007
I have updated the Open method of the SDE driver to return NULL
instead of FALSE in all of its error cases.
<http://trac.osgeo.org/gdal/changeset/12239>
Howard
On Sep 25, 2007, at 11:01 AM, Frank Warmerdam wrote:
> Xuexia,
>
> Reviewing the sdedataset.cpp code I agree there is a problem
> that the "else" case looks very broken. Removing the return
> FALSE might be sufficient.
>
> Could you file a bug in Trac on this issue, and hopefully
> Howard will soon have a chance to address it.
>
> I'd add that the Open() method should be returning NULL on
> failure, not FALSE.
>
> Best regards,
>
> On 9/24/07, chenxuexia <xuex_chen at 126.com> wrote:
>> hi, ALL.
>> I try to read raster data from sde cinfigured oracle database. My
>> program always returned from SDEDataset::Open( GDALOpenInfo *
>> poOpenInfo ),
>> traced here:
>> //////////////////////////////////////////
>> GDALDataset *SDEDataset::Open( GDALOpenInfo * poOpenInfo )
>> {
>> ............
>> ............
>> SDEDataset *poDS;
>> poDS = new SDEDataset();
>> ..............
>> /*
>> --------------------------------------------------------------------
>> */
>> /* If we were given a layer name, use that directly,
>> otherwise */
>> /* query for subdatasets.
>> */
>> /*
>> --------------------------------------------------------------------
>> */
>> if (CSLCount( papszTokens ) == 6 ) {
>> ......
>> }
>> else {
>> ...........//without given a layer name,we get each subdataset.
>> return FALSE;
>> // why? when runs to the ELSE{} always return FALSE.
>> //Should we drop this last sentence "return FALSE;"?
>> }
>> CSLDestroy( papszTokens);
>> return( poDS );
>> }
>>
>> ________________________________
>> 网 易 Yeah.net 邮 箱 夏 日 大 变 脸,带 你 感 受
>> 新 一 代 邮 箱 的 全 新 魅 力 >>
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev
>>
>
>
> --
> ---------------------------------------
> +--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for
> Rent
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list