use-default-preference-values.rst (470B)
1 use-default-preference-values 2 ============================= 3 4 Require providing a second parameter to ``get*Pref`` methods instead of 5 using a try/catch block. 6 7 Examples of incorrect code for this rule: 8 ----------------------------------------- 9 10 .. code-block:: js 11 12 try { blah = branch.getCharPref('blah'); } catch(e) {} 13 14 Examples of correct code for this rule: 15 --------------------------------------- 16 17 .. code-block:: js 18 19 blah = branch.getCharPref('blah', true);