Code Monkey home page Code Monkey logo

Comments (4)

zwetan avatar zwetan commented on July 18, 2024

verify_error1

from as3shebang.

zwetan avatar zwetan commented on July 18, 2024

Not only we want to catch this error but we also want to colorize it like other errors.

for ex
verify_error2

but here the problems

  • the error occurs outside the script scope
  • a try/catch around Runtime.eval() can not catch such errors

from as3shebang.

zwetan avatar zwetan commented on July 18, 2024

a try/catch around Runtime.eval() can not catch such errors
because what happen internally is that the C++ already does a try/catch
and if an error is found it then stringify it to the script output.

by replacing Runtime.eval() with Runtime.returnEval()
we can return the output of the script into a string
and then we can test for some strings to check if a VerifyError occured

then we can format the output as if it was an internal script error

from as3shebang.

zwetan avatar zwetan commented on July 18, 2024

Here the result
verify_error3

we do catch the error
but we remove the stacktrace (as it is not related to the script)
we apply options if they are enabled
etc.

other example with DEBUG enabled
verify_error4

from as3shebang.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.