Bug 10363 - Suggested note to clarify that bb.fatal() raises an exception
Summary: Suggested note to clarify that bb.fatal() raises an exception
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 2.2 M4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 04 Oct 2016: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-10-03 22:20 UTC by ulfalizer
Modified: 2016-10-04 16:23 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfalizer 2016-10-03 22:20:01 UTC
Hello,

It might be unclear that bb.fatal() throws an exception, making people put 'return' after it. Adding this note after the bb.fatal() description in '2.3.11. Recipe Logging Mechanisms' could help:

  Note {
  bb.fatal() throws an exception, meaning you do not need to put a 'return'
  statement after it.
  }


Exactly which exception it is (BBHandledException) might be an implementation detail, so maybe it should be left out.

Cheers,
Ulf
Comment 1 ulfalizer 2016-10-03 22:22:13 UTC
Self-nit: "Raises an exception" is the standard Python terminology.
Comment 2 ulfalizer 2016-10-03 22:36:28 UTC
Feel free to close right away without review for tiny stuff like this btw, even if you make small edits. I could always reopen it if I see an error. :)

Cheers,
Ulf
Comment 3 Richard Purdie 2016-10-04 09:48:23 UTC
I did worry when I saw the title of this bug, I think exactly what happens behind the scenes with bb.fatal is an implementation detail and could well change but I think you've made that clear.
Comment 4 Scott Rifenbark 2016-10-04 16:23:39 UTC
Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#recipe-logging-mechanisms for the new note. 

Setting to RESOLVED and putting the doc flag to "done."

Scott