rem: switch (prefB.getPrefType(aPrefName)) { case nsIPrefBranch.PREF_BOOL: return prefB.getBoolPref(aPrefName); case nsIPrefBranch.PREF_INT: return prefB.getIntPref(aPrefName); case nsIPrefBranch.PREF_STRING: return prefB.getCharPref(aPrefName); default: return aDefault; 
add:    try { switch (prefB.getPrefType(aPrefName)) { case nsIPrefBranch.PREF_BOOL: return prefB.getBoolPref(aPrefName); case nsIPrefBranch.PREF_INT: return prefB.getIntPref(aPrefName); case nsIPrefBranch.PREF_STRING: return prefB.getCharPref(aPrefName); default: return aDefault; } } catch (e) { return aDefault; 
context: function getPrefSafe(aPrefName, aDefault) {    const nsIPrefBranch = Components.interfaces.nsIPrefBranch;    const prefB = Components.classes["@mozilla.org/preferences-service;1"]                            .getService(nsIPrefBranch);    switch (prefB.getPrefType(aPrefName)) {        case nsIPrefBranch.PREF_BOOL:            return prefB.getBoolPref(aPrefName);        case nsIPrefBranch.PREF_INT:            return prefB.getIntPref(aPrefName);        case nsIPrefBranch.PREF_STRING:            return prefB.getCharPref(aPrefName);        default: // includes nsIPrefBranch.PREF_INVALID            return aDefault;    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/a9f3f6a698f351c25531fd3f03125eb821c054a3/calUtils.js/clean/calendar/base/src/calUtils.js