Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    replied
    Sorry, you are quite incorrect.

    The Developer Console *does* log JavaScript errors. What it does not log is JavaScript errors that occur entirely in the domain of GWT code, without ever calling into SmartClient.

    Because GWT mostly generates Exceptions and not JavaScript errors as such, this is rare (mostly hand-written JSNI) and depending on the native debugging facilities in various browsers (which differ greatly and change constantly) and how those interact with GWT's internal error reporting, this is not something where there's a simple, clearly best solution for all scenarios.

    As an example, depending on the browser, browser version, GWT version, the sophistication of your end users, and what tools you have installed, you may actually want to set the UncaughtExceptionHandler back to null to get the best information.

    Now, you weren't necessarily wasting Support's efforts before, but when you try to make public clarifications about our docs which are flat wrong and force us to correct you, then you are, in fact, wasting Support's efforts.

    So please realize that while bug reports are always appreciated, there's a difference between reporting a bug and critiquing a design when you don't actually have all the background knowledge about where the design came from. In these latter cases, please just respect Support's opinion rather than going on to publicly post erroneous information as fact.

    Leave a comment:


  • vostapenko
    replied
    [Editor's note: the content of this post is incorrect. See next post by Isomorphic for clarification]
    Yes, i'm talking about this code.

    And i'm saying that GWT.log() which probably should log messages to developer console (through some registered SmartGWT loggers or something else - that's just an assumption) doesn't do it.

    From my point of view - it is a bug, because in your documentation it's stated that development console provides information about errors.

    If it works as designed, than please fix your docs and replace "See the Development console log for details" as it misleads developers, searching for details. Adding logError method to SC is also appreceated then.

    In your posts you've repeated a couple of times, that Developer Console logs javascript errors, but it does not (at least 3.1, 3.0). And i don't see the reason, why you now consider my report a time-waste.

    You're repeatedly saying that if i don't like your handler - i can implement my own. But it's not about i don't like it, it doesn't work as intended. If one of your visual components contain bug - does it mean i don't like it and should rewrite it on my own? What for is your product then?

    Ok, enougth of this.

    The conclusion of this theme:

    SmartGwt developer console doesn't provide any info about client javascript errors. Any logging of the errors should be implemented in custom handler via GWT.setUncaughtExceptionHandler() and SC.logWarn() (yes, log warn, even if you're loggin error).
    Last edited by Isomorphic; 30 Oct 2012, 15:04.

    Leave a comment:


  • Isomorphic
    replied
    We can't tell if you're just being snide or what. You're talking about this piece of code right:

    Code:
                GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
                    public void onUncaughtException(Throwable e) {
                        if (!GWT.isScript()) {
                            Window.alert("Uncaught exception escaped : " + e.getClass().getName() + "\n" + e.getMessage() +
                                    "\nSee the Development console log for details." +
                                    "\nRegister a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling."
                            );
                        }
                        GWT.log("Uncaught exception escaped", e);
                    }
                });
    If you want different behavior it's very very easy to replace this.

    We don't see the behavior you propose as a straight enhancement, but rather as a tradeoff, so we will not be adding it. We do have other plans in this area, which cannot quickly be summarized, which inform this point of view.

    Anyway, we need to get back to known bugs and improvements.

    Leave a comment:


  • vostapenko
    replied
    I'm really fond of your exception handler. I just want it to work as it has to.

    And i fondly thought Isomorphic is interested in improving ther product and gladly accept bug reports from their beloved users.

    So should i consider this issue rejected or we're going to continue our conversation?
    Last edited by vostapenko; 30 Oct 2012, 13:57.

    Leave a comment:


  • Isomorphic
    replied
    Once again: if you don't like our UncaughtExceptionHandler, because you would like to make sure everything makes it to the Developer Console in a production deployment, you can replace it with your own.

    Just call GWT.setUncaughtExceptionHandler() again.

    Make sense?

    Leave a comment:


  • vostapenko
    replied
    No this is not the problem. SC.logWarn() works just fine and i know about it.

    The problem is that SmartGwt unhandledExceptionHandler registered in com.smartgwt.client.SmartGwtEntryPoint is not logging errors to developer console log.

    Or the problem is that you're trolling me.

    I Know about registering my own exception handlers and loggin everything on my own. But i'm reporting a possible bug in your code.

    So, how can i help you with further investigation?

    Leave a comment:


  • Isomorphic
    replied
    Oh, possibly we see the problem - you don't realize that you can just add your own handler and call SC.logWarn() to put info into the SmartGWT Developer Console?

    Leave a comment:


  • vostapenko
    replied
    I don't know what's eclipse development console, i'm using Intellij Idea. Exceptions are shown in the module log.

    But i don't care about that, because it's not available in the production environment.

    What i really need is showing exceptions in the SmartGwt (SC.showConsole()) developer console.

    It's not in any way trapped by GWT, because errors are correctly handled by unhandledExceptionHandler registered in com.smartgwt.client.SmartGwtEntryPoint.

    Please add my native function to BuiltInDS.java (clean build-in-ds example in 3.0 or 3.1 distr) and call it in any handler to see it your own eyes. If it's too time-consuming, please provide me with some info, how to help you with investigating.

    Leave a comment:


  • Isomorphic
    replied
    Once again, there are two consoles, one that comes with GWT, and one that is specific to SmartGWT (see previous message for details) - you need to look at both, because sometimes GWT traps errors before SmartGWT could ever get them.

    Leave a comment:


  • vostapenko
    replied
    As I said in the first post, there's nothing wrong with the developer console. It's fully functional, except one thing: it doesn't log exceptions.

    To be more precise, thr following is shown in the console

    00:51:08.609:INFO:Log:initialized
    00:51:08.617:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
    00:51:08.766:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value 'function DataView() {
    [native code]
    }'. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    00:51:08.768:WARN:Log:New Class ID: 'EditPane' collides with ID of existing Class object '[DataSource ID:EditPane]'. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    00:51:09.030:INFO:Log:isc.Page is loaded
    And yes, i've checked it:D And yes, it's the one shown by the help of SC.showConsole();

    To summarise: i've built built-in-ds from scratch for 3.1 and 3.0 and development console exceptions logging is not working.
    Last edited by vostapenko; 30 Oct 2012, 12:57.

    Leave a comment:


  • Isomorphic
    replied
    .. and have you checked what's in the console (as the message) suggests? Is there something wrong with it?

    Note, you might be confused here: the Developer Console is the pop-up browser window that is unique to SmartGWT. The "Development console" that GWT refers to is the "Development" tab in Eclipse, which shows Development Mode debug information. Unfortunately GWT's way of referring to this is a bit unclear, especially as of changing terminology from "Hosted Mode" to "Development Mode".

    Leave a comment:


  • vostapenko
    replied
    GWT does not allow a thrown Java exception to become an (uncaught) JavaScript error
    I can't argue on this topic, seems like i have to read more about GWT and Exceptions. But it seems strange that you state that "GWT catches it before then" even though it's handled in SmartGwt default unhandledExceptionHandler which shows alert message...

    But let's change my code to native method to get javascript error

    Code:
    private static native String someName(String name) /*-{
            abc.abc();
            return 'abc';
        }-*/;
    and call it (abc is not defined!! Javascript error).

    Code:
    grid.addRecordClickHandler(new RecordClickHandler() {
                public void onRecordClick(RecordClickEvent event) {
                    DSRecord record = (DSRecord) event.getRecord();
                    bindComponents(record.getDsName());
    		someName("aaa");
                }
            });
    Still no message in the console.

    Alert in hosted mode is correct

    Uncaught exception escaped : com.google.gwt.event.shared.UmbrellaException
    Exception caught: (ReferenceError) @com.smartgwt.sample.client.BuiltInDS::someName(Ljava/lang/String;)([string: 'aaa']): abc is not defined
    See the Development console log for details.
    Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.
    Last edited by vostapenko; 30 Oct 2012, 11:50.

    Leave a comment:


  • Isomorphic
    replied
    Once again, this is a thrown Java exception, not a JavaScript error. GWT does not allow a thrown Java exception to become an (uncaught) JavaScript error. So it does not appear in the Developer Console - GWT catches it before then.

    Leave a comment:


  • vostapenko
    replied
    Originally posted by Isomorphic View Post
    That's correct, GWT.log() does not, in general, log things to the Developer Console. However Warning and higher logs from the Developer Console will appear in the GWT log.
    That is very usefull info! Thank you very much :D

    And now let's get back to the problem.

    I've build from scratch sample "built-in-ds" from

    1) v8.2p_2012-10-30/Pro Deployment (built 2012-10-30)
    2) v8.3d_2012-10-22/Pro Deployment (built 2012-10-22)

    using
    1)gwt-2.5.0-final
    2)gwt-2.1.0

    I've changed BuiltInDS.java, added one line of code:

    Code:
    grid.addRecordClickHandler(new RecordClickHandler() {
                public void onRecordClick(RecordClickEvent event) {
                    DSRecord record = (DSRecord) event.getRecord();
                    bindComponents(record.getDsName());
    		[b]throw new RuntimeException("show me");[/b]
                }
            });
    Exception is thrown, SmartGwtException handler in hosted mode alerts:

    Uncaught exception escaped : com.google.gwt.event.shared.UmbrellaException
    One or more exceptions caught, see full set in UmbrellaException#getCauses
    See the Development console log for details.
    Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling
    No sign of the exception in developer console log (hosted or compiled mode - no matter).

    Please tell me that you see a problem with smartgwt logging system here.

    Leave a comment:


  • Isomorphic
    replied
    That's correct, GWT.log() does not, in general, log things to the Developer Console. However Warning and higher logs from the Developer Console will appear in the GWT log.

    Leave a comment:

Working...
X