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:
parent
04266b0a86
commit
0d40090288
2 changed files with 19 additions and 5 deletions
|
@ -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
|
||||
Display the error message with details when program is suspended because of ICDIErrorInfo.
|
||||
* CDebugTarget.java
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
|
@ -1345,11 +1346,20 @@ public class CDebugTarget extends CDebugElement
|
|||
ICDebugInternalConstants.STATUS_CODE_ERROR,
|
||||
"The execution of program is suspended because of error.",
|
||||
null );
|
||||
status.add( new Status( IStatus.ERROR,
|
||||
status.getPlugin(),
|
||||
ICDebugInternalConstants.STATUS_CODE_ERROR,
|
||||
info.getDetailMessage(),
|
||||
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.getPlugin(),
|
||||
ICDebugInternalConstants.STATUS_CODE_ERROR,
|
||||
token,
|
||||
null ) );
|
||||
}
|
||||
CDebugUtils.error( status, this );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue