[WebExt] How to catch an error from native application?

Talk about add-ons and extension development.
Post Reply
leska
Posts: 128
Joined: January 20th, 2008, 4:04 am
Contact:

[WebExt] How to catch an error from native application?

Post by leska »

The problem is that Firefox Native Messaging API works a bit differently then in Chrome. If

Code: Select all

port = chrome.runtime.connectNative('some.host.name')
which is not exists then we've an error. In Chrome the error message can be found in

Code: Select all

chrome.runtime.lastError
. But in Firefox we don't have an error here. The error is just raised from the module:

Code: Select all

No such native application 'some.host.name  NativeMessaging.jsm:188
. Does anyone know how to catch this error in my code?
Post Reply