diff --git a/OpenEXR/exrmaketiled/main.cpp b/OpenEXR/exrmaketiled/main.cpp index 72568a8ae7..2d0fab9b21 100644 --- a/OpenEXR/exrmaketiled/main.cpp +++ b/OpenEXR/exrmaketiled/main.cpp @@ -393,31 +393,32 @@ main(int argc, char **argv) int exitStatus = 0; - // - // check input - // + try { - MultiPartInputFile input (inFile); - int parts = input.parts(); + // + // check input + // + { + MultiPartInputFile input (inFile); + int parts = input.parts(); - if (partnum < 0 || partnum >= parts){ - cerr << "ERROR: you asked for part " << partnum << " in " << inFile; - cerr << ", which only has " << parts << " parts\n"; - exit(1); - } + if (partnum < 0 || partnum >= parts){ + cerr << "ERROR: you asked for part " << partnum << " in " << inFile; + cerr << ", which only has " << parts << " parts\n"; + exit(1); + } + + Header h = input.header (partnum); + if (h.type() == DEEPTILE || h.type() == DEEPSCANLINE) + { + cerr << "Cannot make tile for deep data" << endl; + exit(1); + } - Header h = input.header (partnum); - if (h.type() == DEEPTILE || h.type() == DEEPSCANLINE) - { - cerr << "Cannot make tile for deep data" << endl; - exit(1); } - } - try - { makeTiled (inFile, outFile, partnum, mode, roundingMode, compression, tileSizeX, tileSizeY,