Search Results

Search found 2 results on 1 pages for 'jordfras'.

Page 1/1 | 1 

  • How to detect exception when executing Javascript in NPAPI plugin?

    - by Jordfräs
    In a plug-in I am using NPN_Evaluate() to execute some Javascript. How can I detect wether the Javascript raises an exception? Basically I want to execute any piece of Javascript and get the result from it or detect if it raised an exception. I tried wrapping my Javascript code like this: try { // Injected Javascript code here } catch (exc) { exc; } That way the result from NPN_Evaluate() will be an NPObject* containing a property "message" with the exception message if something goes wrong. But how can I know that it is an exception? It might as well be a result from the injected Javascript code. Am I approaching this the wrong way? Can I detect an exception without catching it in Javascript and returning the exception as the result?

    Read the article

  • How do I protect python code?

    - by Jordfräs
    I am developing a piece of software in python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile), and remove the code that checks the license file. Another aspect is that my employer do not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem? Preferably with an off-the-shelf solution. The software will run on Linux systems (so I don't think py2exe will do the trick)

    Read the article

1