~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/FreeImage/PluginRAS.cpp

  • Committer: Stefano Rivera
  • Date: 2010-07-24 15:35:51 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: stefanor@ubuntu.com-20100724153551-6s3fth1653huk31a
Tags: upstream-3.13.1
ImportĀ upstreamĀ versionĀ 3.31.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
 
220
220
                        // Verify SUN identifier
221
221
 
222
 
                        if (header.magic != RAS_MAGIC)
223
 
                                throw "Invalid magic number";
 
222
                        if (header.magic != RAS_MAGIC) {
 
223
                                throw FI_MSG_ERROR_MAGIC_NUMBER;
 
224
                        }
224
225
 
225
226
                        // Allocate a new DIB
226
227
 
239
240
                                        break;
240
241
                        }
241
242
 
242
 
                        if (dib == NULL)
243
 
                                throw "DIB allocation failed";
 
243
                        if (dib == NULL) {
 
244
                                throw FI_MSG_ERROR_DIB_MEMORY;
 
245
                        }
244
246
 
245
247
                        // Check the file format
246
248
 
265
267
                                        break;
266
268
 
267
269
                                default:
268
 
                                        throw "Unsupported Sun rasterfile";
 
270
                                        throw FI_MSG_ERROR_UNSUPPORTED_FORMAT;
269
271
                        }
270
272
 
271
273
                        // set up the colormap if needed