有没有办法强制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}
(显式地包装那些抛出我感兴趣的异常的调用),但这样做真的很丑陋...
<TAB>
,看看那里有什么,看看哪些方法已经实现,进入强力模式并重复,等等。 - Daniel C. Sobralsettings.maxPrintString
,请参见此处:https://dev59.com/Ymkw5IYBdhLWcg3w_Pfn - RyanQuey