473,326 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Exception handling

HI
Currently i am handling excpetion using TRY/catch in my code.I am
looking for solution some thing like this.

if an excrption is occured then
1.call a CALLBACK function in a DLL
2.print the log message return from function call but excute the next
instruction in the current function(when i return i want to go to the
next instruction,not the instruction that was raised an exception)
i know want to know using structured excpetion handling and some
assembly language instructions can we do this?.

can some body help

thank u very much

Reddy.
Nov 14 '05 #1
6 1626

<vk********@hotmail.com> wrote

Currently i am handling excpetion using TRY/catch in my code.I am
looking for solution some thing like this.

So you've got the wrong group. comp.lang.c++ is round the corner.
Nov 14 '05 #2
<vk********@hotmail.com> wrote in message
news:75**************************@posting.google.c om...
HI
Currently i am handling excpetion using TRY/catch in my code.I am
looking for solution some thing like this.

if an excrption is occured then
1.call a CALLBACK function in a DLL
2.print the log message return from function call but excute the next
instruction in the current function(when i return i want to go to the
next instruction,not the instruction that was raised an exception)
i know want to know using structured excpetion handling and some
assembly language instructions can we do this?.

can some body help

thank u very much

Reddy.


You can use setjmp/longjmp to set up your own exception handling facility.
It also exists a project of exception handling, which named CException. You
can find it on www.sourceforge.net. Remember to read the comments in the
head file before you use it. Good Luck!
Nov 14 '05 #3
On Sat, 18 Sep 2004 19:15:19 +0800, "Liang Chen"
<mi********@hotmail.com> wrote in comp.lang.c:
<vk********@hotmail.com> wrote in message
news:75**************************@posting.google.c om...
HI
Currently i am handling excpetion using TRY/catch in my code.I am
looking for solution some thing like this.

if an excrption is occured then
1.call a CALLBACK function in a DLL
2.print the log message return from function call but excute the next
instruction in the current function(when i return i want to go to the
next instruction,not the instruction that was raised an exception)
i know want to know using structured excpetion handling and some
assembly language instructions can we do this?.

can some body help

thank u very much

Reddy.


You can use setjmp/longjmp to set up your own exception handling facility.
It also exists a project of exception handling, which named CException. You
can find it on www.sourceforge.net. Remember to read the comments in the
head file before you use it. Good Luck!


And where in the definition of setjmp/longjmp does the C standard
define a way to resume the function that caused the exception at the
machine language instruction right after the one that generated the
exception?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #4
>
And where in the definition of setjmp/longjmp does the C standard
define a way to resume the function that caused the exception at the
machine language instruction right after the one that generated the
exception?


Of course, it is NOT a real exception, but a way for you to handle the
customized exception.
Nov 14 '05 #5
"Liang Chen" <mi********@hotmail.com> wrote in message news:<ci***********@mail.cn99.com>...

And where in the definition of setjmp/longjmp does the C standard
define a way to resume the function that caused the exception at the
machine language instruction right after the one that generated the
exception?


Of course, it is NOT a real exception, but a way for you to handle the
customized exception.

Thank you very much for your help,can you please tell me a way to
resume the function that caused the exception at the machine language
instruction right after the one that generated?
Nov 14 '05 #6
vk********@hotmail.com wrote:
Thank you very much for your help,can you please tell me a way to
resume the function that caused the exception at the machine language
instruction right after the one that generated?


That's not possible without resorting to highly architecture-specific,
and possibly quite arcane, techniques. Ask in a newsgroup which
discusses your OS, compiler and hardware; do not expect the answer to
port to anything else. It certainly cannot be done in portable C.

Richard
Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: adi | last post by:
Dear all, This is more like a theoretical or conceptual question: which is better, using exception or return code for a .NET component? I had created a COM object (using VB6), which uses...
6
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which...
7
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
3
by: Master of C++ | last post by:
Hi, I am an absolute newbie to Exception Handling, and I am trying to retrofit exception handling to a LOT of C++ code that I've written earlier. I am just looking for a bare-bones, low-tech...
2
by: tom | last post by:
Hi, I am developing a WinForm application and I am looking for a guide on where to place Exception Handling. My application is designed into three tiers UI, Business Objects, and Data Access...
9
by: C# Learner | last post by:
Some time ago, I remember reading a discussion about the strengths and weaknesses of exception handling. One of the weaknesses that was put forward was that exception handling is inefficient (in...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
4
by: Ele | last post by:
When Exception handling disabled compiler still spits out "C++ exception handler used." Why is that? Why does it ask for "Specify /EHsc"? Thanks! c:\Program Files\Microsoft Visual Studio...
41
by: Zytan | last post by:
Ok something simple like int.Parse(string) can throw these exceptions: ArgumentNullException, FormatException, OverflowException I don't want my program to just crash on an exception, so I must...
1
by: George2 | last post by:
Hello everyone, Such code segment is used to check whether function call or exception- handling mechanism runs out of memory first (written by Bjarne), void perverted() { try{
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.