MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / main

Function main

samples/test_num_exceptions.cpp:5–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <chaiscript/dispatchkit/function_call.hpp>
4
5int main( int /*argc*/ , char * /*argv*/[] )
6{
7 chaiscript::ChaiScript ch;
8
9
10 try
11 {
12 static const char script[ ] =
13 R""(
14
15 class Rectangle
16 {
17 def Rectangle() { }
18 }
19
20 var rect = Rectangle( );
21
22 )"";
23
24
25 ch.eval( script );
26 }
27 catch ( const std::exception &e )
28 {
29 printf( " >>> Exception thrown: %s \n" , e.what( ) );
30 }
31
32 return 1;
33}

Callers

nothing calls this directly

Calls 2

evalMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected