tango.core.Exception 翻译

tango.core.Exception(r4796)

The exception module defines all system-level exceptions and provides a mechanism to alter system-level error handling.

License:

BSD style: see license.txt

Authors:

Sean Kelly, Kris Bell

class OutOfMemoryException : Exception #
抛出一个内存不足错误( out of memory error)。
class PlatformException : Exception #
操作系统或库异常基类。
class AssertException : Exception #
抛出一个断言错误。
class ArrayBoundsException : Exception #
抛出一个数组边界错误。
class FinalizeException : Exception #
finalize(最终)错误时抛出。
class SwitchException : Exception #
switch错误时抛出。
class TextException : Exception #
表示一个文字处理错误。
class UnicodeException : TextException #
unicode转换错误时抛出。
class ThreadException : PlatformException #
线程异常基类。
class FiberException : ThreadException #
fiber 异常基类。
class SyncException : PlatformException #
synchronization (同步)异常基类。
class IOException : PlatformException #
tango.io包抛出的基本异常。你应该确保所有和 IO相关的 Tango异常都从它派生。
class VfsException : IOException #
tango.io.vfs 包抛出的基本异常。
class ClusterException : IOException #
tango.io.cluster包抛出的基本异常。
class SocketException : IOException #
socket 异常基类。
class HostException : IOException #
InternetHost抛出的异常的基类。
class AddressException : IOException #
Address (地址)抛出的异常的基类。
class SocketAcceptException : SocketException #
当一个 socket(套接字)接受一个输入连接失败时抛出。
class ProcessException : PlatformException #
process (进程)错误时抛出。
class RegexException : TextException #
regluar expression (正则表达式)异常基类。
class LocaleException : TextException #
locale (区域)异常基类。
class XmlException : TextException #
XML 异常基类。
class RegistryException : Exception #
当网络注册( NetworkRegistry)在代理注册期间遇到问题或看到一个未注册的 guid(全局统一标识符)时抛出 RegistryException(注册异常)异常。
class IllegalArgumentException : Exception #
遇到非法参数时抛出。
class IllegalElementException : IllegalArgumentException #
集合( Collection )方法如 add(replace)元素(和 /keys)时它们的参数是 null或不能传递筛选时抛出这个 IllegalElementException(非法参数异常)异常。
class NoSuchElementException : Exception #
迭代器和容器的 past-the-end错误时抛出。(译注:如果迭代器到达了容器中的最后一个元素的后面,则迭代器变成 past-the-end值。使用一个 past-the-end值的指针来访问对象是非法的,就好像使用 NULL或未初始化的指针一样)
class CorruptedIteratorException : NoSuchElementException #
检测到一个损坏的迭代器时抛出。
void setAssertHandler(assertHandlerType h) #
用一个用户提供的断言处理器( assert hander)覆盖( Overrides)默认的版本时抛出该异常。

参数:

h

新断言处理器。设置到null以使用默认的处理器。

void onAssertError(char[] file, size_t line) [extern(C)] #
D中断言错误的回调函数。如果已经提供,用户提供的断言处理器会被调用,否则会抛出 AssertException

参数:

file

向这个错误做出信号的文件名。

line

这个错误发生的行号。

void onAssertErrorMsg(char[] file, size_t line, char[] msg) [extern(C)] #
D中断言错误的回调函数。如果已经提供,用户提供的断言处理器会被调用,否则会抛出 AssertException

参数:

file

向这个错误做出信号的文件名。

line

这个错误发生的行号。

msg

用户提供的错误信息。

void onArrayBoundsError(char[] file, size_t line) [extern(C)] #
D中数组边界错误的回调函数。 ArrayBoundsException (数组边界异常)会被抛出。

参数:

file

向这个错误做出信号的文件名。

line

这个错误发生的行号。

抛出:

ArrayBoundsException(数组边界异常)。
void onFinalizeError(ClassInfo info, Exception ex) [extern(C)] #
Dfinalize 错误的回调函数。一个 FinalizeException 会被抛出。
参数:

e

finalization 期间抛出的异常。

抛出:

FinalizeException.
void onOutOfMemoryError() [extern(C)] #
D中内存溢出(内存不足)错误的回调函数。 OutOfMemoryException (内存溢出异常)会被抛出。

抛出:

OutOfMemoryException.
void onSwitchError(char[] file, size_t line) [extern(C)] #
Dswitch错误的回调函数。一个 SwitchException 会被抛出。

参数:

file

向这个错误做出信号的文件名。

line

这个错误发生的行号。

抛出:

SwitchException.
void onUnicodeError(char[] msg, size_t idx) [extern(C)] #
Dunicode错误的回调函数。一个 UnicodeException 会被抛出。

参数:

msg

关于该错误的信息。

idx

这个错误被检测到的地方的字符串索引。

抛出:

UnicodeException.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值