prevent failure when error string is shorter than 300 characters

If one of the lines in the error string is less than 300 characters then the current Qooxdoo codebase will fail because there is an attempt to create a string slice that is longer than the string.

This pull request addresses that issue by printing 300 characters if they are available and otherwise only printing what is available.