}
}
}
public static void logException(String info, Object obj, Throwable exc) {
ILog theLog = PHPDebugPlugin.getDefault().getLog();
StringBuffer msg = new StringBuffer();
if (obj != null) {
msg.append(obj.getClass().toString());
msg.append(" : "); //$NON-NLS-1$
}
if (info != null) {
msg.append(info);
}
debug(msg.toString());
if (exc != null) {
debugException(exc);
}
/*
* IStatus stat = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
* IStatus.ERROR, msg.toString(), exc); theLog.log(stat);
*/
ByteArrayOutputStream bs = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(bs);
exc.printStackTrace(ps);
IStatus stat = new Status(IStatus.ERROR, PHPDebugPlugin.ID,
IStatus.ERROR, msg + "\n" + bs.toString(), null); //$NON-NLS-1$
theLog.log(stat);
}