有什么办法强制Scala解释器(通过SBT启动)打印完整的堆栈跟踪。默认情况下,将显示10行以内:
如何强制解释器显示完整的堆栈跟踪?
scala> new CacheMonitoringClient
javax.management.InstanceNotFoundException: com.bea:Name=DomainRuntimeService,Type=weblogic.management.beanservers.domainrun
time.DomainRuntimeServiceMBean
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:195)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:224)
at javax.management.remote.rmi.RMIConnectionImpl_921_WLStub.getAttribute(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.security.Security.runAs(Security.java:61)
at weblogic.management.remote.common.RMIConnectionWrapper.getAttribute(ClientProviderBas...
由于我使用try { new CacheMonitoringClient } catch { case ex => ex.printStackTrace}
(包装明确抛出我感兴趣的例外调用)一种解决方法,但真难看......
+1,这些REPL提示和技巧是否记录在某处? – missingfaktor 2010-09-22 19:59:59
@Missing请关注邮件列表和irc上的paulp,他有时会炫耀他实施的一些新技巧。除此之外,只需按下''看看里面有什么,看看实现了什么方法,进入电源模式并重复等等。 –
2010-09-22 22:18:37