locale.js: report more meanungful information to the error console.