"Debug" build of glow with helpful errors
Reported by Stephen Elson | July 17th, 2009 @ 02:32 PM | in 2.0
Some of Glow could throw more helpful errors by checking params & state, but this slows applications down & increases filesize.
Our uncompressed versions of glow should have these checks which are stripped out when the compressed versions are built.
Something like:
//DEBUG
if (glow.debug) {
if (typeof arg != "string") {
throw new Error("Param 'arg' must be a string");
}
}
//END DEBUG
We'd still check something like glow.debug, which would be true by default. This allows us to set it to false while performance testing glow.
Comments and changes to this ticket
-
Stephen Elson July 17th, 2009 @ 02:32 PM
- Tag set to enhancement
Maybe look at m4, cpp or other preprocessor for stripping out the unwanted code
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A JavaScript Library