[Answered]Runtime Error. What is instance of 'std::logic_error'

Started by
10 comments, last by Tradone 18 years ago
[edit] Whoops, that's not right...
I think I need to add that the error message is a little misleading:
Quote:libstdc++
if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0))
  __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
So it will complain about NULL even if the char array is just empty ("\0").

Glad you fixed the problem.


jfl.

[Edited by - jflanglois on April 4, 2006 9:44:21 AM]
Advertisement
oops my bad that wasn't the problem.
the real problem that was causing the thing was this:

getenv("QUERY_STRING")

so if there is no query string passed through the cgi, the returns a NULL.
Before:
	if ( s == "&"  ){		if ( !ParseGet( getenv("QUERY_STRING") ) )			return Failure;	}


After:
	if ( s == "&" && getenv("QUERY_STRING") != NULL ){		if ( !ParseGet( getenv("QUERY_STRING") ) )			return Failure;	}


Difference:
getenv("QUERY_STRING") != NULL


So yea. That was the REAL reason.

This topic is closed to new replies.

Advertisement