事件,例如方法或者构造器调用,类或者对象初始化,以及异常,这些都是有效的aop触发器。
Events, such as methods or constructor calls, classes or object initialization, and exceptions, are all valid AOP triggers.
值得注意的是,除非您捕捉从构造函数抛出的异常,否则,如果php脚本未能连接到数据库,它将终止。
It's worth noting that, unless you catch exceptions that are thrown from the constructor, your PHP script will terminate if it could not connect to the database.
类型构造函数的另一个独特行为是运行库管理类型构造函数中的异常的方式。
Another behavior unique to type constructors is how the runtime manages exceptions in a type constructor.
如果使用BigDecimal(double)构造函数不恰当,在传递给JDBCsetBigDecimal()方法时,会造成似乎很奇怪的 JDBC 驱动程序中的异常。
Improper use of the BigDecimal(double) constructor can show up as strange-seeming exceptions in JDBC drivers when passed to the JDBC setBigDecimal() method.
为了解决这一问题,可以在抛出异常语句期间,在异常对象的构造函数中生成一个堆栈跟踪。
To deal with this, you can generate a stack trace in the constructor of the exception object during the throw exception statement.
如果某人触法源于异常的神经构造使人别无选择,那么这人就不该受罚,这种观点有争议,却非新鲜事。
The idea that someone should not be punished if their abnormal neural make-up leaves them no choice but to break the law is contentious but not new.
当创建自己的异常类型时,您还应该另外添加两个构造函数。
When creating your own exception types, you should add the extra two constructors also.
当没有匹配的构造函数时,抛出运行时异常。
Throw an exception at run time when there is no matching constructor.
可以通过两种方式来处理异常情况:架构师可以对新的应用程序的体系结构强加一些限制和约束,使其遵循现有的体系结构构造。
Exceptions can be dealt with in two ways: The architects can impose limitations and constraints on the architecture of the new application so that it follows the existing architectural constructs.
换一种说法就是永远都不要为那些其构造函数和析构函数可能抛出异常的类定义全局(静态全局)实例。
The other way to say it is, never define a global (static global) instance of a class whose constructor or destructor may throw exceptions.
处理该问题的另一种方法是:只要泛型类的运行时实例化没有包括所需构造函数,就抛出异常。
Another way of handling this problem would be to throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
只要泛型类的运行时实例化没有包括所需的构造函数,就抛出异常。
Throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.
如果您将顶级异常搞得太具体,那么其结果是您今后将不得不重新构造层次结构,以适应某些较通用的情况。
If you make your top-level exception too specific you'll end up having to restructure your hierarchy later to fit in something more generic.
异常处理是一种编程语言构造,旨在处理某些更改常规执行流的情况(异常)。
Exception handling is a programming language construct designed to handle the occurrence of some condition (exception) that changes the normal flow of execution.
这极为简单,使用错误的参数类型调用构造函数或方法时,会引发异常。
This is extremely simplistic and leads to an exception being thrown when a constructor or method is called with the wrong argument types.
JAX - RPC要求,具体服务的异常拥有一个构造函数,该构造函数的参数与所有的可获得的属性是一对一的关系。
JAX-RPC requires that a service-specific exception have a constructor equipped with parameters in a one-to-one relationship with all gettable properties.
运行库将停止任何尝试保留类型构造函数的异常,并将该异常包装到一个新的TypeInitializationException对象内。
The runtime will stop any exceptions trying to leave a type constructor and wrap the exception inside of a new TypeInitializationException object.
一个有趣的事情是决定将来自此方法的任何异常,以及构造函数中出现的任何异常作为IOException返回。
One interesting point is the decision to return any exceptions from this method, as well as any that arise in the constructor, as IOExceptions.
BusinessProcessModelingNotation (BPMD)支持一些异常处理构造,它们可用于对业务流程中的异常流进行建模。
Business process Modeling Notation (BPMD) supports exception handling constructs that you can use to model exceptional flows within the business process.
其主要任务是研究各种断裂模型中断裂位置与重力异常线性构造信号极大值位置之间的对应关系。
The main task is to research relation of all kinds of fault models fault positions and gravity anomaly linear structure signal maximum positions.
例如,对于Exception类的构造函数应该定义为protected,而不是public,这就可以强迫开发者采取正确的方式,抛出一个适当的异常。
For example, had the constructor of exception been protected instead of public, developers would have been almost forced to do the right thing and throw an appropriate exception.
第一,该程序不会为类型是ApplicationException的异常寻找catch子句,即使这种类型的异常是从静态构造函数引发的也如此。
First, the program did not hit the catch clause for an exception of type ApplicationException, even though that's the type of exception thrown from the static constructor.
file_lock类的构造函数接受要锁定的文件的名称,一定要在调用lock之前打开文件;否则会抛出异常。
The constructor for the file_lock class accepts the name of the file to be locked, and it's important to open the file before lock is invoked; otherwise, an exception will be thrown.
管理构造函数和析构函数中的异常
构造函数要处理来自构造函数初始化式的异常,唯一的方法是将构造函数编写为函数测试块。
The only way for a constructor to handle an exception from a constructor initializer is to write the constructor as a function try block.
所谓重力异常线性构造信号就是重力异常水平总梯度沿重力方向的一阶导数且是大于零值的那一部分。
So-called gravity anomaly linear structure signal is derivative of gravity anomaly level total gradient on gravity direction, and the derivatives must be greater than zero.
类似地,在初始化数组或其他容器类型的元素的时候,也可能发生异常,同样,也要保证将会适当地撤销已构造的元素。
Similarly, an exception might occur when initializing the elements of an array or other container type. Again, we are guaranteed that the constructed elements will be destroyed.
异常区的空间分布演化与震中、地质构造和地热等有密切关系。
The variation of the spatial distribution of the anomaly region is closely related to the epicenter, geological structure and geothermal activity.
异常区的空间分布演化与震中、地质构造和地热等有密切关系。
The variation of the spatial distribution of the anomaly region is closely related to the epicenter, geological structure and geothermal activity.
应用推荐