difference kernel exception handling and programming language exception handling -


i don't understand how c++, java or others high level languages support exception handling work??? know if write application run in user mode , if rises exception 0 division, system call interrupt routine in kernel mode or use try/catch block???

what want is: when write simple code in c++ example this:

#include <iostream> using namespace std;  double divide(int a, int b) {    if( b == 0 )    {       throw "division 0 condition!";    }    return (a/b); }  int main () {    int x = 50;    int y = 0;    double z = 0;     try {      z = divide(x, y);      cout << z << endl;    }catch (const char* msg) {      cerr << msg << endl;    }     return 0; } 

and compile it, i'm getting software inside exception routine. mean, during execution code cpu try x/y , raise exception. now, in case handles error: 1) process un user mode pass workflow exception routine write or 2) system switch in kernel mode , throw trap running interrupt routine.

i don't understand specific steps system linux or windows use solve exception???


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -