Anonymous - 2002-09-19

I'm trying to handle an exception in my program.  But the compiler keeps truncating the error message.

example:

Please enter a string greater than 20 chars:
This string is longer than 20 chars

**** String is tΘ"
Error: Θ"

the error message should read,
**** String is too long! Input Truncated ****

Here are some code snippets
if (m_length == STRING_MAX_CAPACITY)
  {
    char error[] =
    "**** String is too long! Input Truncated ****";
    throw error;
  }

and in main()

catch (char * error)
  {
    cout << error << endl;
    cout << "Error: " << error << endl;
    //that second line is there for testing purposes only.
  }

Any ideas?