org.openide.nodes.NodeTransfer.maybeReportException()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.openide.nodes.NodeTransfer.maybeReportException()方法的一些代码示例,展示了NodeTransfer.maybeReportException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NodeTransfer.maybeReportException()方法的具体详情如下:
包路径:org.openide.nodes.NodeTransfer
类名称:NodeTransfer
方法名:maybeReportException

NodeTransfer.maybeReportException介绍

[英]Print a stack trace if debugging is on. Used for exceptions that could occur when probing transferables, which should not interrupt the probing with an error, but indicate a bug elsewhere and should be reported somehow.
[中]如果调试处于打开状态,则打印堆栈跟踪。用于探测可转移数据时可能发生的异常,这些异常不应因错误而中断探测,但表明其他地方存在错误,并应以某种方式报告。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Find an intelligent source of paste types in a transferable.
* Note that {@link AbstractNode#createPasteTypes} looks for this
* by default, so cut/copied nodes may specify how they may be pasted
* to some external node target.
* @param t the transferable to test
* @return the intelligent source or <code>null</code> if none is in the transferable
*/
public static Paste findPaste(Transferable t) {
  try {
    if (t.isDataFlavorSupported(nodePasteFlavor)) {
      return (Paste) t.getTransferData(nodePasteFlavor);
    }
  } catch (ClassCastException cce) {
    maybeReportException(cce);
  } catch (IOException ioe) {
    maybeReportException(ioe);
  } catch (UnsupportedFlavorException ufe) {
    maybeReportException(ufe);
  }
  return null;
}

代码示例来源:origin: org.netbeans.api/org-openide-nodes

maybeReportException(nfe);
} catch (ClassCastException cce) {
  maybeReportException(cce);
} catch (IOException ioe) {
  maybeReportException(ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException(ufe);

代码示例来源:origin: org.netbeans.api/org-openide-nodes

maybeReportException(cce);
} catch (IOException ioe) {
  maybeReportException(ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException(ufe);

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Find an intelligent source of paste types in a transferable.
* Note that {@link AbstractNode#createPasteTypes} looks for this
* by default, so cut/copied nodes may specify how they may be pasted
* to some external node target.
* @param t the transferable to test
* @return the intelligent source or <code>null</code> if none is in the transferable
*/
public static Paste findPaste (Transferable t) {
  try {
    if (t.isDataFlavorSupported (nodePasteFlavor)) {
      return (Paste)t.getTransferData (nodePasteFlavor);
    }
  } catch (ClassCastException cce) {
    maybeReportException (cce);
  } catch (IOException ioe) {
    maybeReportException (ioe);
  } catch (UnsupportedFlavorException ufe) {
    maybeReportException (ufe);
  }
  return null;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Find an intelligent source of paste types in a transferable.
* Note that {@link AbstractNode#createPasteTypes} looks for this
* by default, so cut/copied nodes may specify how they may be pasted
* to some external node target.
* @param t the transferable to test
* @return the intelligent source or <code>null</code> if none is in the transferable
*/
public static Paste findPaste (Transferable t) {
  try {
    if (t.isDataFlavorSupported (nodePasteFlavor)) {
      return (Paste)t.getTransferData (nodePasteFlavor);
    }
  } catch (ClassCastException cce) {
    maybeReportException (cce);
  } catch (IOException ioe) {
    maybeReportException (ioe);
  } catch (UnsupportedFlavorException ufe) {
    maybeReportException (ufe);
  }
  return null;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

maybeReportException (nfe);
} catch (ClassCastException cce) {
  maybeReportException (cce);
} catch (IOException ioe) {
  maybeReportException (ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException (ufe);

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

maybeReportException (nfe);
} catch (ClassCastException cce) {
  maybeReportException (cce);
} catch (IOException ioe) {
  maybeReportException (ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException (ufe);

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

maybeReportException (cce);
} catch (IOException ioe) {
  maybeReportException (ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException (ufe);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

maybeReportException (cce);
} catch (IOException ioe) {
  maybeReportException (ioe);
} catch (UnsupportedFlavorException ufe) {
  maybeReportException (ufe);

相关文章