Results 1 to 5 of 5

Thread: Carriage returns missing in stack traces

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    12

    Default Carriage returns missing in stack traces

    It seems newlines in stack traces have changed to contain only a line feed, not a carriage return. This makes emacs (correctly) consider the session logs to have inconsistent line endings. This seems to be a rather recent change.

  2. #2
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    It seems newlines in stack traces have changed to contain only a line feed, not a carriage return. This makes emacs (correctly) consider the session logs to have inconsistent line endings. This seems to be a rather recent change.
    Originally Posted by apologue View Post
    There was a recent change that added stack traces to the session logs. However since they were not there before I'm a little confused about what you are saying. Would the following be a reasonable description?

    Previous - session logs had consistent line endings and no stack traces.
    Current - session logs have inconsistent line endings if, and only, if the log contains a stack trace.
    Well, thank you.
    Originally Posted by Veracity View Post

  3. #3
    Junior Member
    Join Date
    Dec 2010
    Posts
    12

    Default

    There was a recent change that added stack traces to the session logs. However since they were not there before I'm a little confused about what you are saying. Would the following be a reasonable description?

    Previous - session logs had consistent line endings and no stack traces.
    Current - session logs have inconsistent line endings if, and only, if the log contains a stack trace.
    Originally Posted by fronobulax View Post
    Oh yes, you are absolutely right. Sorry about the confusion.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    Stack traces are hard-coded to have LFs:

    Code:
    			s.append( "\n\u00A0\u00A0at " );
    They should use the constant we use for a line break:

    Code:
    				sb.append( KoLConstants.LINE_BREAK );
    (Which is actually in spellcast/UtilityConstants:

    Code:
    	public static final String LINE_BREAK = System.getProperty( "line.separator" );

  5. #5
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    r20063

    Untested but I expect it will work :-)

    Thank you veracity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •