JLink`
JLink`

JavaThrow

JavaThrow["exception"]

causes an exception of the specified class to be thrown in the Java thread that called the Wolfram Language program in which JavaThrow occurred.

JavaThrow["exception","message"]

specifies an optional detail message for the exception.

JavaThrow[object]

causes the specified Java Exception object to be thrown.

更多信息和选项

  • To use JavaThrow, you first need to load J/Link using Needs["JLink`"].
  • JavaThrow is a specialized function that few programmers will have any use for.
  • It is up to the user to ensure that the exception being created has an appropriate constructor.
Wolfram Research (2007),JavaThrow,Wolfram 语言函数,https://reference.wolfram.com/language/JLink/ref/JavaThrow.html.

文本

Wolfram Research (2007),JavaThrow,Wolfram 语言函数,https://reference.wolfram.com/language/JLink/ref/JavaThrow.html.

CMS

Wolfram 语言. 2007. "JavaThrow." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/JLink/ref/JavaThrow.html.

APA

Wolfram 语言. (2007). JavaThrow. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/JLink/ref/JavaThrow.html 年

BibTeX

@misc{reference.wolfram_2024_javathrow, author="Wolfram Research", title="{JavaThrow}", year="2007", howpublished="\url{https://reference.wolfram.com/language/JLink/ref/JavaThrow.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_javathrow, organization={Wolfram Research}, title={JavaThrow}, year={2007}, url={https://reference.wolfram.com/language/JLink/ref/JavaThrow.html}, note=[Accessed: 18-November-2024 ]}