Closed Bug 1162826 Opened 5 years ago Closed 5 years ago

Display a proper error when a moz.build tries to set a "reserved keyword"

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(2 files)

If you put something like the following in a moz.build:
   template = 'foo'

config.status fails with a non annotated traceback:
Traceback (most recent call last):
  File "./config.status", line 1003, in <module>
    config_status(**args)
  File "/gecko/python/mozbuild/mozbuild/config_status.py", line 149, in config_status
    summary = the_backend.consume(definitions)
  File "/gecko/python/mozbuild/mozbuild/backend/base.py", line 180, in consume
    for obj in objs:
  File "/gecko/python/mozbuild/mozbuild/frontend/emitter.py", line 142, in emit
    for out in output:
  File "/gecko/python/mozbuild/mozbuild/frontend/reader.py", line 1100, in read_mozbuild
    raise bre
mozbuild.frontend.reader.BuildReaderError

There are two problems: one is that the error printing code doesn't display the "ERROR PROCESSING MOZBUILD FILE" message, and the other is that the thrown exception (KeyError in that case) doesn't have a message.
Attachment #8603113 - Flags: review?(mshal) → review+
Attachment #8603114 - Flags: review?(mshal) → review+
https://hg.mozilla.org/mozilla-central/rev/18bd273a594b
https://hg.mozilla.org/mozilla-central/rev/3804df2cb876
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.