search for: myexcept

Displaying 15 results from an estimated 15 matches for "myexcept".

Did you mean: except
2015 Sep 14
2
inlining in exception handing region
...hat some small > functions with the throw statement were not inlined because the exception > handling code increased the inline cost. In the c++ example below, the > inline cost of fCallee is high mainly because of instructions for the > throw statement, and note that the constructor of MyException is even > inlined in fCallee. > > Assuming that the exception handling code is rarely executed, would it > make sense to prevent CallSites in exception handling region (e.g., the > constructor of MyException) from being inlined so that we can avoid code > size blow-up in except...
2011 Jul 12
5
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
...Tted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost C++ code, but instead I get the abort "terminate called after throwing an instance of 'MyException'". I am compiling the system with g++ (on Linux and OSX); I haven't tried MSVC++. Is there something that I need to do to get this behaviour to work? I admit that I have only a fairly basic understanding of how exception handling is implemented in C++ but from what I've read...
2007 Apr 09
0
How to render my own error pages correctly?
Hi there, I am trying to get my own error pages (404 for example) displayed correctly. I raise an error in my controller: raise MyException.new, "Bad thing." Therefore I defined: class MyException < Exception end Furthermore I catch that in application.rb: def rescue_action_in_public(exception) case exception when MyException logger.error("404 displayed") render :file => &qu...
2011 Jul 21
0
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
...Tted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost C++ code, but instead I get the abort "terminate called after throwing an instance of 'MyException'". I am compiling the system with g++ (on Linux and OSX); I haven't tried MSVC++. > > Is there something that I need to do to get this behaviour to work? I admit that I have only a fairly basic understanding of how exception handling is implemented in C++ but from what I...
2011 Jul 21
2
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
...Tted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost C++ code, but instead I get the abort "terminate called after throwing an instance of 'MyException'". I am compiling the system with g++ (on Linux and OSX); I haven't tried MSVC++. >> >> Is there something that I need to do to get this behaviour to work? I admit that I have only a fairly basic understanding of how exception handling is implemented in C++ but from w...
2011 Jul 21
0
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
...Tted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost C++ code, but instead I get the abort "terminate called after throwing an instance of 'MyException'". I am compiling the system with g++ (on Linux and OSX); I haven't tried MSVC++. > > Is there something that I need to do to get this behaviour to work? I admit that I have only a fairly basic understanding of how exception handling is implemented in C++ but from what I...
2011 Jul 21
0
[LLVMdev] Catching exceptions passed through a JIT ExecutionEngine
...Tted function, which in turn calls back into my code. Everything works fine unless an exception is thrown; I would except the outermost try/catch(...) block to catch the exception thrown in my innermost C++ code, but instead I get the abort "terminate called after throwing an instance of 'MyException'". I am compiling the system with g++ (on Linux and OSX); I haven't tried MSVC++. >>> >>> Is there something that I need to do to get this behaviour to work? I admit that I have only a fairly basic understanding of how exception handling is implemented in C++ bu...
2017 Feb 05
2
help me understand how nounwind attribute on functions works?
from http://llvm.org/docs/LangRef.html: nounwind > This function attribute indicates that the function never raises an > exception. If the function does raise an exception, its runtime behavior is > undefined. However, functions marked nounwind may still trap or generate > asynchronous exceptions. Exception handling schemes that are recognized by > LLVM to handle asynchronous
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...and D() and C() are called using LLVM > “call”. > But if I JIT these functions one at a time it will fail. If I use llvm > “invoke” to JIT the function C() - then the thrown exception will make it > to A() and everything works. > > // In C++ > // > void D() { > throw MyException(); > }; > > void C() { > D(); // This should be able to be called with “call” > // - but if I JIT this function it won’t work - I need “invoke” and a > dummy landing pad > }; > > void B() { > C(); // This can be called with "call" > }; &gt...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...d C() are called using LLVM “call”. >> But if I JIT these functions one at a time it will fail. If I use llvm “invoke” to JIT the function C() - then the thrown exception will make it to A() and everything works. >> >> // In C++ >> // >> void D() { >> throw MyException(); >> }; >> >> void C() { >> D(); // This should be able to be called with “call” >> // - but if I JIT this function it won’t work - I need “invoke” and a dummy landing pad >> }; >> >> void B() { >> C(); // This can be call...
2017 Feb 09
4
help me understand how nounwind attribute on functions works?
...> > I think this behavior is intended to allow better LTO between C and C++. Consider this kind of code: > > // foo.h > extern "C" int doThing(bool canThrow); > // foo.cpp > int doThing(bool canThrow) { > ... > if (hadError) { > if (canThrow) throw MyException; else return -1; > } > } > // bar.c > #include "foo.h" > void f() { > doThing(false); // don't declare doThing as nounwind > } > // baz.cpp > ... > doThing(true); > > Basically, compiling a C declaration for a function is not an assertion...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...> But if I JIT these functions one at a time it will fail. If I use llvm “invoke” to JIT the function C() - then the thrown exception will make it to A() and everything works. >>>> >>>> // In C++ >>>> // >>>> void D() { >>>> throw MyException(); >>>> }; >>>> >>>> void C() { >>>> D(); // This should be able to be called with “call” >>>> // - but if I JIT this function it won’t work - I need “invoke” and a dummy landing pad >>>> }; >>>> >...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
Hi Christian, > I don’t see anything in the Itanium ABI that says I need to call the function that throws an exception with “invoke” to get exception handling to work! AFAICT, it is the design of LLVM IR and its implementation. To catch the exceptions thrown by the callee functions, we should use the invoke instruction along with the landingpad instruction. If you are calling a function
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...ese functions one at a time it will fail. If I use llvm “invoke” to JIT the function C() - then the thrown exception will make it to A() and everything works. >>>>> >>>>> // In C++ >>>>> // >>>>> void D() { >>>>> throw MyException(); >>>>> }; >>>>> >>>>> void C() { >>>>> D(); // This should be able to be called with “call” >>>>> // - but if I JIT this function it won’t work - I need “invoke” and a dummy landing pad >>>>> }...
2007 Jul 31
2
controller exceptions
Since Merb has the lovely property of rendering the output of an action, using ruby-level exceptions to render error pages in Merb could be a cute way to approach error handling. Suppose one has an action for editing a product which you would like to restrict to administrators: def edit raise AdminAccessReqired unless session[:user] and session[:user].admin? @product =