src/browser.js
function getErrorMessage (err, target, defaultMsg) {
    var errMessage;
    if (err) {
        errMessage = err.toString();
    } else {
        errMessage = defaultMsg;
    }
    return errMessage.replace('%target%', target);
}
function getErrorMessage (err, target, defaultMsg) {
    var errMessage;
    if (err) {
        errMessage = err.toString();
    } else {
        errMessage = defaultMsg;
    }
    return errMessage.replace('%target%', target);
}
function getErrorMessage ( err , target , defaultMsg ) { var errMessage ; if ( err ) { errMessage = err . toString ( ) ; } else { errMessage = defaultMsg ; } return errMessage . replace ( '%target%' , target ) ; }
err might be null, in which case defaultMsg is used. target MUST be defined or an error is thrown.
err might be null in which case defaultMsg is used . target MUST be defined or an error is thrown .