#8583 closed defect (fixed)
console.debug used in xhr.js; breaks in Safari 3.2.1/OS X 10.5.6
Reported by: | dtgriscom | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | General | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The error function at line 470 of xhr.js (dojo 1.2.3) uses console.debug, which breaks under Safari 3.2.1, as there's no debug method on the console. Should use console.info or something else that's available. Only happens if there's a separate error, but that's when it shouldn't happen.
Change History (5)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by
The model I've been promoting is that neither console.debug nor console.log belong in our code, except maybe in the case of experimental code where log might be ok. It's akin to leaving printf's in your code and implies that something is unfinished. console.error and warn are used in our code when something is important enough that the end user should see it, and even there we need to better define our style.
We had gone through and removed them all, I think, but it seems they're creeping back into the codebase. Most of the hits you see are commented out. This was the last one in _base, and there are only a handful in core and dijit. Ripping out console.log and debug calls SRTL is a good idea IMO, with or without the build tool trick.
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
Milestone: | tbd → 1.3 |
---|
If you use a standard release build, or do a custom build with stripConsole=normal, then you can avoid this issue until we have a proper fix.
Ideally, I want to convert all console.debug calls to just console.log. There are a lot to trim though, around 500. Also need to ask developers to not use console.debug anymore.