assert false; causes "Cannot read property 'replace' of undefined

37 views
Skip to first unread message

Michael Joyner

unread,
Oct 18, 2017, 12:41:49 PM10/18/17
to google-we...@googlegroups.com, google-web-tool...@googlegroups.com

Eh... don't think this is quite right... it seems an assert  without an ":" argument is not handled properly in the assert logging code.

Wed Oct 18 12:35:36 GMT-400 2017 com.google.gwt.logging.client.LogConfiguration
SEVERE: (TypeError) : Cannot read property 'replace' of undefined
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'replace' of undefined

Colin Alworth

unread,
Oct 18, 2017, 1:42:21 PM10/18/17
to GWT Users
Do you have a little more context? At a guess, this is something like String.replace, but the string you are calling it on is null, so the method won't work...

Michael Joyner

unread,
Oct 18, 2017, 2:57:54 PM10/18/17
to google-we...@googlegroups.com

I'm compiling with asserts enabled.

I put in an "assert false;" which should cause an assert.

It appears the assert happens, but then the built-in GWT logger isn't checking if it is receiving a NULL/undefined for an assert reason?

My logging configuration from the *.gwt.xml:


<inherits name="com.google.gwt.logging.Logging" />
    <set-property name="gwt.logging.logLevel" value="INFO" />
    <set-property name="gwt.logging.enabled" value="TRUE" />
    <set-property name="gwt.logging.consoleHandler" value="DISABLED" />
    <set-property name="gwt.logging.developmentModeHandler"
        value="ENABLED" />
    <set-property name="gwt.logging.systemHandler" value="ENABLED" />

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages