Skip to content

Invalid code line is printed in the exception raised for properties that not hold. #1

@dkarageo

Description

@dkarageo

When a lovpy.exceptions.PropertyNotHoldsException exception is raised, the next code line is printed instead of the expected one.

For example, when executing lovpy for one of the example programs as following:

python -m lovpy examples/invalid_thread_test.py

the traceback text presented below is printed. However, in all three reported code lines of the traceback, while line number is correct, the printed text refers to the next line of the expected one.

Traceback (most recent call last):
  File "examples\invalid_thread_test.py", line 43, in <module>
  File "examples\invalid_thread_test.py", line 33, in get_both_parts <-- LAST CORRECT LINE, line 31
    second = get_second_part()
  File "examples\invalid_thread_test.py", line 10, in get_first_part
    try:
lovpy.exceptions.PropertyNotHoldsException: A property found not to hold:
        WHEN call acquire THEN SHOULD NOT locked_$threading.get_ident()$ AND locked_$threading.get_ident()$

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions