How to catch Errors in C# through Javascripts . #1562
Unanswered
hiepsahplydia
asked this question in
Q&A
Replies: 2 comments 1 reply
-
So what is not working? Can you give something concrete, like a code example? |
Beta Was this translation helpful? Give feedback.
0 replies
-
using Jint;
using Jint.Runtime;
var engine = new Engine();
try
{
engine.Execute(@"
function a() {
b();
}
function b() {
c();
}
function c() {
d();
}
function d() {
e();
}
function e() {
throw new Error('Here are some messages :D');
}
a();
");
}
catch (JavaScriptException e)
{
Console.WriteLine(e.InnerException);
} outputs
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a question. How i can catch an Error in C#, and print this error to console through javascripts.
Beta Was this translation helpful? Give feedback.
All reactions