Ticket #245 (closed defect: fixed)

Opened 12 years ago

Last modified 11 years ago

Trace fails on empty messages

Reported by: smm Owned by: rhl
Priority: minor Milestone:
Component: mwi Keywords: mwi trace
Cc: Blocked By:
Blocking: Project: LSST
Version Number: 3454
How to repeat:
import lsst.mwi.utils as utils
utils.Trace("a", -10000, "")


A very minor defect. Running this

import lsst.mwi.utils as utils
utils.Trace("a", -10000, "")


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lsst/sandbox/mwi/trunk/python/lsst/mwi/utils.py", line 689, in __init__
    this = _utils.new_Trace(*args)
Exception: basic_string::substr

The problem is in Trace.cc:200

    if (msg.substr(msg.size() - 1) != "

which throws if msg.size() == 0.

Change History

comment:1 Changed 12 years ago by rhl

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in the obvious way. [3543]

comment:2 Changed 11 years ago by robyn

  • Milestone DC2 Integration deleted

Milestone DC2 Integration deleted

Note: See TracTickets for help on using tickets.