|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Member
Iscritto dal: Jun 2005
Messaggi: 47
|
[C++]Rilanciare eccezioni
In una soluzione SmartDevice in C++ ho 3 progetti
Project A: Codice:
TestProjectA::TestProjectA(){}
void TestProjectA::testThrowException()
{
int cont = 0;
if(cont == 0)
throw exception();
}
Codice:
TestRethrowException::TestRethrowException()
{
this->projA = new TestProjectA();
}
void TestRethrowException::testRethrowException()
{
try
{
projA->testThrowException();
}
catch(exception)
{
throw exception();
}
}
Main Codice:
TestRethrowException *tr = new TestRethrowException();
int i=0;
for(i=0;i<3;i++)
{
try
{
tr->testRethrowException();
}
catch(exception)
{
int y = 0;
int u = 0;
}
}
Quando i=1 l'eccezione è catturata quando i=2 entra nel metodo "FindFrameInfo(EHRegistrationNode *pRN)" che è nel file "frame_ce.cpp" di Microsoft. In questo metodo entra in un ciclo infinito. perché? |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Oct 2005
Messaggi: 3306
|
Quote:
Il tuo codice cattura sempre l'eccezione e non c'è traccia della chiamata a FindFrameInfo. |
|
|
|
|
|
|
#3 |
|
Bannato
Iscritto dal: Feb 2005
Città: Roma
Messaggi: 7029
|
cercando su Google ho visto che hai postato anche su MSDN e ti hanno risposto in Microsoft accettandolo come feedback, dicendoti anche che non riescono a riprodurre il problema in ambiente desktop; é molto probabile che sia un bug di Windows Mobile.
|
|
|
|
|
|
#4 |
|
Bannato
Iscritto dal: Feb 2005
Città: Roma
Messaggi: 7029
|
|
|
|
|
|
|
#5 | |
|
Senior Member
Iscritto dal: Oct 2005
Messaggi: 3306
|
Quote:
Visto che nel codice mancano pure le casistiche sul valore di i elencate prima. Certo che se alla microsoft lo hanno riconosciuto come bug di Windows Mobile (o forse del compilatore che genera codice buggato?), dubito che qualcuno in questo forum possa essere di aiuto. |
|
|
|
|
|
|
#6 | |
|
Member
Iscritto dal: Jun 2005
Messaggi: 47
|
Quote:
Scusate |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 23:58.




















