~ubuntu-branches/debian/stretch/openbabel/stretch

« back to all changes in this revision

Viewing changes to src/obconversion.cpp

  • Committer: Package Import Robot
  • Author(s): Daniel Leidert
  • Date: 2013-05-22 19:08:27 UTC
  • mfrom: (1.1.11) (7.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20130522190827-72q0fnx5y2nm3bc0
Tags: 2.3.2+dfsg-1
* New upstream release.
* debian/control: Dropped DM-Upload-Allowed field.
  (Standards-Version): Bumped to 3.9.4.
* debian/copyright: Massive update.
* debian/upstream: Author name update.
* debian/get-orig-source.sh: Remove the windows-*/ directory too.
* debian/openbabel.install: Removed roundtrip manpage.
* debian/openbabel-gui.install: Fixed manpage name.
* debian/openbabel-gui.links: Removed unused file.
* debian/rules: Enable OpenMP. Disable tests on `nocheck'.
* debian/patches/gaussformat_nosym.patch: Dropped. Applied upstream.
* debian/patches/moldenformat_coordonly.patch: Ditto.
* debian/patches/obspectrophore_man.patch: Ditto.
* debian/patches/fix_ftbfs.patch: Added.
  - Fix several FTBFS issues in upstream build system.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        #endif
32
32
#endif
33
33
 
 
34
// #define DONT_CATCH_EXCEPTIONS     // This is useful when debugging an exception
 
35
 
34
36
#include <iosfwd>
35
37
#include <fstream>
36
38
#include <sstream>
510
512
          rInpos = pInStream->tellg();
511
513
 
512
514
        bool ret=false;
513
 
        try
 
515
#ifndef DONT_CATCH_EXCEPTIONS
 
516
       try
 
517
#endif
514
518
          {
515
519
            ret = pInFormat->ReadChemObject(this);
516
520
/*            if (ret && IsOption("readconformers", GENOPTIONS)) {
543
547
*/
544
548
            SetFirstInput(false);
545
549
          }
 
550
#ifndef DONT_CATCH_EXCEPTIONS
546
551
        catch(...)
547
552
          {
548
553
            if(!IsOption("e", GENOPTIONS) && !OneObjectOnly)
551
556
              return Index; // the number we've actually output so far
552
557
            }
553
558
          }
 
559
#endif
554
560
 
555
561
        if(!ret)
556
562
          {
1122
1128
    //If infile == outfile issue error message and return false
1123
1129
    //If name without the extensions are the same issue warning and return true;
1124
1130
    //Otherwise return true
1125
 
    bool ret=true;
1126
1131
    string inname1, inname2;
1127
1132
    string::size_type pos;
1128
1133
    pos = infile.rfind('.');
1195
1200
    ios_base::openmode omode =
1196
1201
      pOutFormat->Flags() & WRITEBINARY ? ios_base::out|ios_base::binary : ios_base::out;
1197
1202
    obErrorLog.ClearLog();
 
1203
#ifndef DONT_CATCH_EXCEPTIONS
1198
1204
    try
 
1205
#endif
1199
1206
      {
1200
1207
        ofstream ofs;
1201
1208
 
1422
1429
          }
1423
1430
        return Count;
1424
1431
      }
 
1432
#ifndef DONT_CATCH_EXCEPTIONS
1425
1433
    catch(...)
1426
1434
      {
1427
1435
        obErrorLog.ThrowError(__FUNCTION__, "Conversion failed with an exception.",obError);
1428
1436
        return Count;
1429
1437
      }
 
1438
#endif
1430
1439
    return Count;
1431
1440
  }
1432
1441