Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10566

turning warning into error

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Medium
    • Resolution: Unresolved
    • master
    • None
    • PyROOT
    • None
    • ROOT master

      py 3.8.1

      compiled from source with gcc 7.3.0

       

    Description

      Hello,

      I'm trying turning warnings into (fatal) errors as suggested here (https://root-forum.cern.ch/t/turning-warnings-into-errors/37872), i.e., changing gErrorAbortLevel. However, it does not work:

       In [1]: import ROOT
       In [2]: def test_warning(): 
       ...: ROOT.Warning("adf","adf") 
       ...:
       In [3]: def test_error(): 
       ...: ROOT.Error("adf","adf") 
       ...:
       In [4]: test_warning() 
       adf:0: RuntimeWarning: adf
       In [5]: test_error() 
       Error in <adf>: adf
       In [6]: ROOT.gErrorAbortLevel = ROOT.kWarning
       In [7]: test_warning() 
       adf:0: RuntimeWarning: adf
       In [8]: test_error()
       [never ending output, its beginning you may find in the attachment]
      

      problem 1: the warning is printed independently of the value of gErrorAbortLevel

      problem 2: the error message (see In[8]) does not abort the program. On different platform (py3.7.6, ROOT 6.18/04) there is similar hard to read traceback with last message "Aborted (core dumped)" and whole ipython abords - which is probably expected behaviour.

       

      It looks to me like a bug somewhere...

       

      Cheers,

      Jiri

       

       

      output.txt

      Attachments

        Activity

          People

            etejedor Enric Tejedor Saavedra
            jprochaz Jiri Prochazka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: