Skip to content

Commit 6a95ab7

Browse files
committed
fix: Ioc出错打印的log, 原来一直都不对,啊啊啊啊
1 parent 8870e4d commit 6a95ab7

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/org/nutz/ioc/impl/ObjectMakerImpl.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import org.nutz.lang.born.Borning;
2121
import org.nutz.lang.born.MethodBorning;
2222
import org.nutz.lang.born.MethodCastingBorning;
23-
import org.nutz.log.Log;
24-
import org.nutz.log.Logs;
2523

2624
/**
2725
* 在这里,需要考虑 AOP
@@ -31,8 +29,6 @@
3129
*/
3230
public class ObjectMakerImpl implements ObjectMaker {
3331

34-
private static final Log log = Logs.get();
35-
3632
public ObjectProxy make(IocMaking ing, IocObject iobj) {
3733
// 获取 Mirror, AOP 将在这个方法中进行
3834
Mirror<?> mirror = ing.getMirrors().getMirror(iobj.getType(),
@@ -133,7 +129,7 @@ public ObjectProxy make(IocMaking ing, IocObject iobj) {
133129
// 当异常发生,从 context 里移除 ObjectProxy
134130
catch (Throwable e) {
135131
ing.getContext().remove(iobj.getScope(), ing.getObjectName());
136-
throw new IocException("create ioc bean fail name=" + ing.getObjectName(), e);
132+
throw new IocException(e, "create ioc bean fail name=%s ioc define:\n%s", ing.getObjectName(), iobj);
137133
}
138134

139135
// 返回

0 commit comments

Comments
 (0)