sg_location::setPath (const char* path)
{
if (path) {
- strncpy(_path, path, MAX_PATH);
- _path[MAX_PATH -1] = '\0';
+ strncpy(_path, path, max_path);
+ _path[max_path -1] = '\0';
} else {
_path[0] = '\0';
}
{
}
+sg_io_exception::sg_io_exception (const string& message,
+ const sg_location &location,
+ const string& origin)
+ : sg_exception(message, origin),
+ _location(location)
+{
+}
+
sg_io_exception::~sg_io_exception () throw ()
{
}
{
if (text) {
strncpy(_text, text, MAX_TEXT_LEN);
- _text[MAX_TEXT_LEN] = '\0';
+ _text[MAX_TEXT_LEN-1] = '\0';
} else {
_text[0] = '\0';
}