Ticket #245 (closed defect: fixed)
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, "") |
Description
A very minor defect. Running this
import lsst.mwi.utils as utils utils.Trace("a", -10000, "")
Gives:
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
Note: See
TracTickets for help on using
tickets.
Fixed in the obvious way. [3543]