try {
IRunnableWithProgress opxml = OpcontrolDataProvider.checkKernelModule(result);
opxml.run(null);
- } catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ String error = "The OProfile kernel module could not be loaded";
+ String reason = "An error occurred initializing OProfile for use with the plugin. Please check OProfile to be installed successfully";
+ OprofileComm.showErrorDialog(error, reason , e); //$NON-NLS-1$
+ } catch (InterruptedException e) {
String error = "The OProfile kernel module could not be loaded";
String reason = "An error occurred initializing OProfile for use with the plugin. Please check OProfile to be installed successfully";
OprofileComm.showErrorDialog(error, reason , e); //$NON-NLS-1$
IRunnableWithProgress opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().checkEvents(ctr, event, um, validResult);
opxml.run(null);
} catch (InvocationTargetException e) {
+ e.printStackTrace();
} catch (InterruptedException e) {
+ e.printStackTrace();
} catch (OpxmlException e) {
OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
return null;
events = new OpModelEvent[sessionList.size()];
sessionList.toArray(events);
} catch (InvocationTargetException e) {
+ e.printStackTrace();
} catch (InterruptedException e) {
+ e.printStackTrace();
} catch (OpxmlException e) {
OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
}
opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().modelData(eventName, sessionName, image);
opxml.run(null);
} catch (InvocationTargetException e) {
+ e.printStackTrace();
} catch (InterruptedException e) {
+ e.printStackTrace();
} catch (OpxmlException e) {
OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
return null;
try {
if(_info==null||isValid(_info))
initializeOprofileModule();
- } catch (Exception e) {
+ } catch (OpcontrolException e) {
e.printStackTrace();
}
IRunnableWithProgress opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().info(info);
opxml.run(null);
} catch (InvocationTargetException e) {
+ e.printStackTrace();
} catch (InterruptedException e) {
+ e.printStackTrace();
} catch (OpxmlException e) {
OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
}
private void runCommand(String[] comm) throws OpcontrolException {
String str = OprofileComm.getCommandString(comm);
- // String result=null;
- try {
- // result = session.run(str);
- //session.run(str, null);
+// String result=null;
+// try {
+// result = session.run(str);
+// session.run(str, null);
if(str.contains(_OPD_START_COLLECTION)){
str = str + " && echo start_ok";
}
CommandManager.runShell(str);
+/*
} catch (Exception e) {
String devType = null;
if(null == ConnectionPlugin.getDefault().getCurrentDevice()){
throw new OpcontrolException(OprofileCorePlugin.createErrorStatus(
"opcontrolRun (" + devType + ")", e)); //$NON-NLS-1$
}
+*/
// -----------------------------------
// jinu removed at 20090616
import java.io.IOException;
import java.io.StringReader;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
reader = factory.newSAXParser().getXMLReader();
- } catch (Exception e) {
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ return false;
+ } catch (SAXException e) {
e.printStackTrace();
return false;
}
try {
processor = (XMLProcessor) handlerClass.newInstance();
} catch (InstantiationException e) {
+ e.printStackTrace();
} catch (IllegalAccessException e) {
+ e.printStackTrace();
}
}
try {
numCounters = Integer.parseInt(_characters);
} catch (NumberFormatException nfe) {
+ nfe.printStackTrace();
}
OpInfo info = (OpInfo) callData;
info._setNrCounters(numCounters);
package org.tizen.oprofile.core;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import org.eclipse.core.runtime.IStatus;
try {
IRunnableWithProgress opxml = OpcontrolDataProvider.checkEvent(event, count, unitmask, result);
opxml.run(null);
- } catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ String error = "An error has occured during check event setting for OProfile";
+ String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
+ showErrorDialog(error, reason , e); //$NON-NLS-1$
+ } catch (InterruptedException e) {
String error = "An error has occured during check event setting for OProfile";
String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
showErrorDialog(error, reason , e); //$NON-NLS-1$
runner.run(null);
events = new OpModelEvent[eventList.size()];
eventList.toArray(events);
- } catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ String error = "An error has occured during get detailed information of supported event for OProfile";
+ String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
+ showErrorDialog(error ,reason, e); //$NON-NLS-1$
+ } catch (InterruptedException e) {
String error = "An error has occured during get detailed information of supported event for OProfile";
String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
showErrorDialog(error ,reason, e); //$NON-NLS-1$
try {
IRunnableWithProgress runner = OpcontrolDataProvider.getModelData(model);
runner.run(null);
- } catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ String error = "An error has occured during get reported data in current session";
+ String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
+ showErrorDialog(error, reason, e); //$NON-NLS-1$
+ return null;
+ } catch (InterruptedException e) {
String error = "An error has occured during get reported data in current session";
String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
showErrorDialog(error, reason, e); //$NON-NLS-1$
IRunnableWithProgress runner = OpcontrolDataProvider.getEventInfo(info);
runner.run(null);
- } catch (Exception e) {
+ } catch (InvocationTargetException e) {
+ String error = "An error has occured during get event list in current session";
+ String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
+ showErrorDialog(error , reason, e); //$NON-NLS-1$
+ } catch (InterruptedException e) {
String error = "An error has occured during get event list in current session";
String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
showErrorDialog(error , reason, e); //$NON-NLS-1$
throws InterruptedException {
String[] resultStr = null;
- try {
- // resultStr =
- // session.run(COMMAND_CHECK_EVENT+" "+event+":"+count+":"+unitmask,
- // null);
resultStr = CommandManager
.runCommandReturningResultArray(COMMAND_CHECK_EVENT + " "
+ event + ":" + count + ":" + unitmask);
- } catch (Exception e) {
- throw new InterruptedException();
- }
if (resultStr != null && resultStr.length > 0
&& resultStr[0].trim().length() > 0) {
public void parse(String[] result) throws InterruptedException {
String[] resultStr = null;
- try {
- // resultStr = session.run(COMMAND_CHECK_KERNEL, null);
- resultStr = CommandManager
+ resultStr = CommandManager
.runCommandReturningResultArray(COMMAND_CHECK_KERNEL);
- } catch (Exception e) {
- throw new InterruptedException();
- }
-
if (resultStr != null && resultStr.length > 0
&& resultStr[0].trim().length() > 0) {
result[0] = resultStr[0].trim();
public void parse() throws InterruptedException {
String resultStr = null;
- try {
- // resultStr = session.run(COMMAND_EVENT_LIST, null);
- resultStr = CommandManager
- .runCommandReturningResult(COMMAND_EVENT_LIST);
- } catch (Exception e) {
- throw new InterruptedException();
- }
+ resultStr = CommandManager.runCommandReturningResult(COMMAND_EVENT_LIST);
if (resultStr == null || resultStr.trim().length() == 0)
return;
public void parse() throws InterruptedException {
String[] resultStr = null;
- try {
- // resultStr = session.run(COMMAND_COUNTER_NO, null);
- resultStr = CommandManager.runCommandReturningResultArray(COMMAND_COUNTER_NO);
- } catch (Exception e) {
- throw new InterruptedException();
- }
+ resultStr = CommandManager.runCommandReturningResultArray(COMMAND_COUNTER_NO);
if (resultStr != null && resultStr.length >1) {
// System.out.println("######## opcontrol -l : "+resultStr);
OprofileSAXHandler handler = new OprofileSAXHandler(root);
String resultStr= null;
- try {
- //resultStr = session.run(COMMAND_SESSION_EVENT, null);
- int orgtimeout = SdbPreferences.getTimeOut();
- SdbPreferences.setTimeOut(60000);
- resultStr = CommandManager.runCommandReturningResult(COMMAND_SESSION_EVENT);
- SdbPreferences.setTimeOut(orgtimeout);
+
+ //resultStr = session.run(COMMAND_SESSION_EVENT, null);
+ int orgtimeout = SdbPreferences.getTimeOut();
+ SdbPreferences.setTimeOut(60000);
+ resultStr = CommandManager.runCommandReturningResult(COMMAND_SESSION_EVENT);
+ SdbPreferences.setTimeOut(orgtimeout);
- } catch (Exception e) {
- throw new InterruptedException();
- }
if(resultStr==null||resultStr.trim().length() ==0){
// root.reset();
try {
saxParser.parse(new InputSource(new StringReader(resultStr)),handler);
- } catch (Exception e) {
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
e.printStackTrace();
}
String[] resultStr= null;
- try {
- //resultStr = session.run(COMMAND_SESSION_EVENT, null);
- resultStr = CommandManager.runCommandReturningResultArray(COMMAND_SESSION_EVENT);
- } catch (Exception e) {
- throw new InterruptedException();
- }
+ resultStr = CommandManager.runCommandReturningResultArray(COMMAND_SESSION_EVENT);
if(resultStr==null||resultStr.length == 0 )
return;
package org.tizen.oprofile.core.provider;
+import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import javax.xml.parsers.ParserConfigurationException;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
import org.tizen.oprofile.core.processor.eventinfo.OpInfoProcessor;
import org.tizen.oprofile.core.processor.modeldata.ModelDataProcessor;
import org.tizen.oprofile.core.processor.sessions.SessionsProcessor;
+import org.xml.sax.SAXException;
public abstract class OpcontrolDataProvider{
try {
new ModelDataProcessor(model).parse();
- } catch (Exception e) {
+ } catch (InterruptedException e) {
+ throw new InterruptedException();
+ } catch (SAXException e) {
+ throw new InterruptedException();
+ } catch (IOException e) {
+ throw new InterruptedException();
+ } catch (ParserConfigurationException e) {
throw new InterruptedException();
}
}
// newCoreException(TizenLaunchMessages.CANNOT_LAUNCH,
// new Exception("Cannot change to run-directory : "
// + ". (Return Code: " + resultRsp + ")"));
+
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
IPath exeFile = CDebugUtils.verifyProgramPath(config);
remoteExePath += exeFile.toFile().getName();
new Exception(
"Executable does not exist on a valid path. You must install your application before running it."));
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
+
monitor.worked(2);
preProcedure(config, launch, monitor, remoteExePath);
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
+
String arguments = config
.getAttribute(
ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
// CommandManager.runShell(cmd);
runApplication(config, launch, cmd);
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
+
postProcedure(config, launch, monitor);
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
} catch (CoreException e) {
- throw e;
+ newCoreException(e.getMessage(), e.getCause());
+ } catch (OperationCanceledException e) {
+ newCoreException("Operation canceled by user.", null);
} catch (Exception e) {
newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, e);
} finally {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- } else {
- monitor.done();
- }
+ monitor.done();
}
}
BufferedReader br = new BufferedReader(new InputStreamReader(
oprofileProc.getInputStream()));
while (null != br.readLine()) {
+ ;
}
br.close();
} catch (CoreException e) {
TizenOprofileLaunchDelegate.checkProfilingTool(monitor);
} catch(Exception e) {
-
+ e.printStackTrace();
}
return new AbstractLaunchConfigurationTab[] { new OprofileEventConfigTab() };
_options.setKernelImageFile(config.getAttribute(OprofileLaunchPlugin.ATTR_KERNEL_IMAGE_FILE, "")); //$NON-NLS-1$
_options.setSeparateProfilesMask(config.getAttribute(OprofileLaunchPlugin.ATTR_SEPARATE_SAMPLES, OprofileDaemonOptions.SEPARATE_NONE));
} catch (CoreException e) {
+ e.printStackTrace();
}
}
_daemonEvent.setProfileUser(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(_number), false));
_daemonEvent.setResetCount(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(_number), OprofileDaemonEvent.COUNT_UNINITIALIZED));
- } catch (CoreException ce) {
-
+ } catch (CoreException e) {
+ e.printStackTrace();
}
}
//jinu added at 20090602
public static double getDoubleFloor(double dblDigit, int position){
double dblCal = Math.pow(10, position);
- try{
- return (int)(dblDigit*(int)dblCal) / dblCal;
- }catch(Exception e){
- throw new NumberFormatException();
- }
+ return (int)(dblDigit*(int)dblCal) / dblCal;
}
-
}
*/
public class OprofileViewDoubleClickListener implements IDoubleClickListener {
public void doubleClick(DoubleClickEvent event) {
- IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();;
-
+ IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();
+/*
if (element instanceof UiModelEvent) {
// UiModelEvent event = (UiModelEvent)element;
-
} else if (element instanceof UiModelSession) {
- /* moved into an action menu */
+ // moved into an action menu
} else if (element instanceof UiModelImage) {
// UiModelImage image = (UiModelImage)element;
-
} else if (element instanceof UiModelSymbol) {
- /* disable this.. for binary section such as .plt,
- * this will open the binary in an editor = bad */
+ // disable this.. for binary section such as .plt,
+ // this will open the binary in an editor = bad
//jump to 1st line in the file
// UiModelSymbol symbol = (UiModelSymbol)element;
// e.printStackTrace();
// }
// }
- } else if (element instanceof UiModelSample) {
+ } else
+*/
+ if (element instanceof UiModelSample) {
//jump to line number in the appropriate file
UiModelSample sample = (UiModelSample)element;
int line = sample.getLine();
package org.tizen.oprofile.ui.chart;
import org.eclipse.birt.chart.device.IDeviceRenderer;
+import org.eclipse.birt.chart.exception.ChartException;
import org.eclipse.birt.chart.factory.GeneratedChartState;
import org.eclipse.birt.chart.factory.Generator;
import org.eclipse.birt.chart.factory.RunTimeContext;
gr.render( deviceRenderer, state );
}
- catch ( Exception ex )
+ catch ( ChartException ex )
{
paintError = ex;
}
package org.tizen.oprofile.ui.editor;
import java.io.File;
+import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.tizen.oprofile.core.processor.modeldata.handler.OprofileSAXHandler;
import org.tizen.oprofile.ui.view.OprofileViewLabelProvider;
+import org.xml.sax.SAXException;
public class OprofileEditor extends MultiPageEditorPart {
}
Point size = gc.textExtent(text);
- int offset = Math.max(0, (event.height - size.y) / 2);
- // gc.drawText(text, event.x+2, event.y+offset, true);
+// int offset = Math.max(0, (event.height - size.y) / 2);
+// gc.drawText(text, event.x+2, event.y+offset, true);
}
}
});
sourceEditor = new TextEditor();
int index = addPage(sourceEditor, getEditorInput());
setPageText(index, "Source");
- }catch(PartInitException e){}
+ }catch(PartInitException e) {
+ e.printStackTrace();
+ }
}
private void updateTitle(){
try {
SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
saxParser.parse(new File(filePath),new OprofileSAXHandler(opModel));
- } catch (Exception e) {
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
e.printStackTrace();
}
try {
writer = new FileWriter(fileName);
writer.write(uiModel.getXML());
- }catch (Exception e) {
+ }catch (IOException e) {
+ e.printStackTrace();
}finally{
try {
if (writer != null)
*/
public class OprofileViewDoubleClickListener implements IDoubleClickListener {
public void doubleClick(DoubleClickEvent event) {
- IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();;
+ IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();
+/*
if (element instanceof UiModelEvent) {
// UiModelEvent event = (UiModelEvent)element;
} else if (element instanceof UiModelSession) {
- /* moved into an action menu */
+ // moved into an action menu
} else if (element instanceof UiModelImage) {
// UiModelImage image = (UiModelImage)element;
} else if (element instanceof UiModelSymbol) {
- /* disable this.. for binary section such as .plt,
- * this will open the binary in an editor = bad */
+ // disable this.. for binary section such as .plt,
+ // this will open the binary in an editor = bad
//jump to 1st line in the file
// UiModelSymbol symbol = (UiModelSymbol)element;
// e.printStackTrace();
// }
// }
- } else if (element instanceof UiModelSample) {
+ } else
+*/
+ if (element instanceof UiModelSample) {
//jump to line number in the appropriate file
UiModelSample sample = (UiModelSample)element;
int line = sample.getLine();
}
}
} catch (CModelException e) {
+ e.printStackTrace();
}
}
}
*******************************************************************************/
package org.eclipse.linuxtools.valgrind.core;
+import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InputStream;
while ((ch = in.read()) != -1) {
out.append((char) ch);
}
- } catch (Exception e) {
+ } catch (IOException e) {
out.append("\n" + NLS.bind(Messages.getString("StreamReaderThread.Read_error"), e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
});
} catch (ValgrindCanceledException e) {
- // do nothing
+ e.printStackTrace();
} catch (OperationCanceledException e) {
newCoreException("Operation canceled by user.", null);
} catch (CoreException e) {
- throw e;
+ newCoreException(e.getMessage(), e.getCause());
+ } catch (IOException e) {
+ newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, e);
} catch (Exception e) {
newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, e);
} finally {
processFactoryID = config.getAttribute(ATTR_PROCESS_FACTORY_ID,
(String) null);
} catch (CoreException e) {
+ e.printStackTrace();
}
}
if (processFactoryID != null) {
ERROR, DebugCoreMessages.DebugPlugin_8, exception);
log(status);
break;
+ default:
+ break;
}
}
case NOTIFY_EVENTS:
fListener.handleDebugEvents(fEvents);
break;
+ default:
+ break;
}
}
{
impossibleLabel.setText(Messages.getString("ValgrindOptionsTab.inemul"));
}
- else
- {
+// else
+// {
// impossible
- }
+// }
canInitialize = false;
return;
image = MassifPlugin
.imageDescriptorFromPlugin(MassifPlugin.PLUGIN_ID,
"icons/call_hierarchy.gif").createImage(); //$NON-NLS-1$
+ break;
+ default:
+ break;
}
}
return image;
case PEAK:
font = JFaceResources.getFontRegistry().getBold(
JFaceResources.DIALOG_FONT);
+ break;
+ default:
+ break;
}
return font;
}
if (buffer != null) {
gc.drawImage(buffer, 0, 0);
}
- } catch (Exception ex) {
+ } catch (ChartException ex) {
paintError = ex;
} finally {
gcImage.dispose();
updateTitle();
- try {
- loadMassifData();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
+ try {
+ loadMassifData();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ }
}
image = MassifPlugin
.imageDescriptorFromPlugin(MassifPlugin.PLUGIN_ID,
"icons/call_hierarchy.gif").createImage(); //$NON-NLS-1$
+ break;
+ default:
+ break;
}
}
return image;
case PEAK:
font = JFaceResources.getFontRegistry().getBold(
JFaceResources.DIALOG_FONT);
+ break;
+ default:
+ break;
}
return font;
}
sourceEditor = new TextEditor();
int index = addPage(sourceEditor, getEditorInput());
setPageText(index, "Source");
- }catch(PartInitException e){}
+ }catch(PartInitException e){
+ e.printStackTrace();
+ }
}
private void updateTitle(){
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IAction;
}
}
- } catch (Exception e) {
- //System.out.println("Error:" + e.getMessage());
+ } catch (CoreException e) {
+ e.printStackTrace();
}
}
}
try{
cnt_def_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e){
+ catch(NumberFormatException e){
try{
temp_byte = temp_byte.replace(",", "");
cnt_def_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e1){
+ catch(NumberFormatException e1){
temp_byte = temp_byte.substring(0, temp_byte.indexOf(" ("));
cnt_def_byte += Integer.valueOf(temp_byte);
}
try{
cnt_def_block += Integer.valueOf(temp_block);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_block = temp_block.replace(",", "");
cnt_def_block += Integer.valueOf(temp_block);
}
try{
cnt_poss_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_byte = temp_byte.replace(",", "");
cnt_poss_byte += Integer.valueOf(temp_byte);
try{
cnt_poss_block += Integer.valueOf(temp_block);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_block = temp_block.replace(",", "");
cnt_poss_block += Integer.valueOf(temp_block);
}
return treeElement.getPid();
case 6:
return treeElement.getTid();
+ default:
+ return null;
}
}
if (element instanceof StackFrameTreeElement) {
Node iN = errorNodes.item(j);
if(iN.getNodeName().equals("text")) {
what = iN.getTextContent();
- } else if(iN.getNodeName().equals("leakedbytes")) {
-
- } else if(iN.getNodeName().equals("leakedblocks")) {
-
+// } else if(iN.getNodeName().equals("leakedbytes")) {
+// } else if(iN.getNodeName().equals("leakedblocks")) {
}
}
}
createSourcePage();
updateTitle();
- try {
- loadMemcheckData();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
+ try {
+ loadMemcheckData();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ }
}
private void createMemcheckPage(){
}
}
- } catch (Exception e) {
- //System.out.println("Error:" + e.getMessage());
+ } catch (CoreException e) {
+ e.printStackTrace();
}
}
}
try{
cnt_def_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e){
+ catch(NumberFormatException e){
try{
temp_byte = temp_byte.replace(",", "");
cnt_def_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e1){
+ catch(NumberFormatException e1){
temp_byte = temp_byte.substring(0, temp_byte.indexOf(" ("));
cnt_def_byte += Integer.valueOf(temp_byte);
}
try{
cnt_def_block += Integer.valueOf(temp_block);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_block = temp_block.replace(",", "");
cnt_def_block += Integer.valueOf(temp_block);
}
try{
cnt_poss_byte += Integer.valueOf(temp_byte);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_byte = temp_byte.replace(",", "");
cnt_poss_byte += Integer.valueOf(temp_byte);
try{
cnt_poss_block += Integer.valueOf(temp_block);
}
- catch(Exception e){
+ catch(NumberFormatException e){
temp_block = temp_block.replace(",", "");
cnt_poss_block += Integer.valueOf(temp_block);
}
return treeElement.getPid();
case 6:
return treeElement.getTid();
+ default:
+ return null;
}
}
if (element instanceof StackFrameTreeElement) {
sourceEditor = new TextEditor();
int index = addPage(sourceEditor, getEditorInput());
setPageText(index, "Source");
- }catch(PartInitException e){}
+ }catch(PartInitException e){
+ e.printStackTrace();
+ }
}
private void updateTitle(){
package org.tizen.valgrind.ui.handler;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
in.close();
out.close();
- }catch (Exception e) {
+ }catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }catch (IllegalStateException e) {
+ e.printStackTrace();
+ }catch (IOException e) {
+ e.printStackTrace();
}finally{
try {
if (writer != null)