Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Orion editor, nonexistant stylers

Hi,
Since the error doesn't happen in the normal flow code, it doesn't break anything. It's just that I tend to prefer correct code.
It has some inconvenients though:
- it adds noise in the js console, which makes debugging of other, more severe error, harder
- once again during debug, it interferes with the use of "stop on uncaught errors"-like functions in browsers web tools

Of course, these are only development concern, no finished  product ones.


2014-07-22 16:18 GMT+02:00 Grant Gayed <Grant_Gayed@xxxxxxxxxx>:
Hi Mickaël,

We could add an error handler function at the require, but the only thing this would change would be to no long propagate the error to your global require.onError function.  The case of an invalid contentType works for me, the editor just shows no styling, which is expected since the provision of a contentType is optional anyways.  Is it failing worse for you, or was the error propagation to your global require.onError function your main concern?

Grant




From:        Mickaël Leduque <mickael.leduque@xxxxxxxxx>
To:        Orion developer discussions <orion-dev@xxxxxxxxxxx>,
Date:        07/21/2014 10:29 AM
Subject:        [orion-dev] Orion editor, nonexistant stylers
Sent by:        orion-dev-bounces@xxxxxxxxxxx




Hi,

I have a problem when I open a file in an orion editor (js script version) with a mime-type that doesn't have a matching styler script on the server.

At http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.editor/web/orion/editor/edit.js?id=R6_0#n285 the editor highlighter attempts to load/requires a styler script at a canonical url based on the mime-type.

But there is no error code path in the require call, so if the file doesn't exist, an exception is thrown when the response comes.

Sure, I have set a global require.onError, but it's general and doesn't have the context for a better reaction than "ignore".

In my opinion, this is a bug. Is this a known one with a bugzilla issue already filed ?

Mickaël_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top