Bug 10363

Summary: Suggested note to clarify that bb.fatal() raises an exception
Product: [Documentation] Reference Reporter: ulfalizer
Component: handbookAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: poky.doc.watcher, poky.watcher, richard.purdie
Version: 2.2   
Target Milestone: 2.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: 04 Oct 2016: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

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