Hello,
I'm sorry for this "cross-posting" but on the user's ML
nobady seems to be affected or frustrated by this
problem. Take the following code as example:
[myexception.h]
#include <string>
#include <stdexcept>
using std::string;
using std::runtime_error;</stdexcept></string>
namespace my
{
class MyException : public runtime_error
{
public:
MyException(const string& msg);
};
}
[myexception.cpp]
#include "myexception.h"
using my::MyException;
MyException::MyException(const string& msg)
:runtime_error(msg)
{
}
[myclass.h]
namespace my
{
class MyClass
{
public:
MyClass();
~MyClass();
void my_method(int something) const
throw(MyException);
};
}
[myclass.cpp]
#include "myclass.h"
using my::MyException;
using my::MyClass;
MyClass::MyClass()
{
}
MyClass::~MyClass()
{
}
void
MyClass::my_method(int something) const
throw(MyException)
{
int remind_me;
if (something != 0)
throw MyException("invalid argument");
}
Ok, in the class browser i see:
+MyException
+MyClass
| |- ~MyClass()
| |- MyClass()
|
|- remind_me : int
This is only a little piece of code and mybe the class
browser behaviour can differ, I got this problem on a
large piece of code.
This is what happens:
1 - Below the MyClass node "my_method" does not
appear;
2 - The "remind_me" variable declared
into "my_method" appear as a global one;
This happen for all methods with a throwable exception
declaration. The project compile and link as expected,
without warnings or errors.
The "throw" declaration following the method's prototype
seems to be the cause.
Thank you,
--
Gaetano Sferra
Logged In: YES
user_id=1355466
I'm sorry for my forgetfulness, my post refers to the 4.9.9.2
release of Dev-C++, updated with last packages available.