1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Split the detail message of ICDIErrorInfo into tokens and trancate aech token if it is too long.

This commit is contained in:
Mikhail Khodjaiants 2002-12-10 03:46:46 +00:00
parent 04266b0a86
commit 0d40090288
2 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2002-12-09 Mikhail Khodjaiants
Split the detail message of ICDIErrorInfo into tokens and trancate aech token if it is too long.
* CDebugTarget.java
2002-12-08 Mikhail Khodjaiants 2002-12-08 Mikhail Khodjaiants
Display the error message with details when program is suspended because of ICDIErrorInfo. Display the error message with details when program is suspended because of ICDIErrorInfo.
* CDebugTarget.java * CDebugTarget.java

View file

@ -9,6 +9,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.StringTokenizer;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.CoreModel;
@ -1345,11 +1346,20 @@ public class CDebugTarget extends CDebugElement
ICDebugInternalConstants.STATUS_CODE_ERROR, ICDebugInternalConstants.STATUS_CODE_ERROR,
"The execution of program is suspended because of error.", "The execution of program is suspended because of error.",
null ); null );
StringTokenizer st = new StringTokenizer( info.getDetailMessage(), "\n\r" );
while( st.hasMoreTokens() )
{
String token = st.nextToken();
if ( token.length() > 200 )
{
token = token.substring( 0, 200 );
}
status.add( new Status( IStatus.ERROR, status.add( new Status( IStatus.ERROR,
status.getPlugin(), status.getPlugin(),
ICDebugInternalConstants.STATUS_CODE_ERROR, ICDebugInternalConstants.STATUS_CODE_ERROR,
info.getDetailMessage(), token,
null ) ); null ) );
}
CDebugUtils.error( status, this ); CDebugUtils.error( status, this );
} }
} }