Skip to content

New REPL does not catch Exceptions #3305

Closed
@allanrenucci

Description

@allanrenucci
> console
scala> null.toString 
[error] (run-main-2) java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at dotty.tools.repl.Rendering.valueOf(Rendering.scala:56)
	at dotty.tools.repl.Rendering.renderVal(Rendering.scala:75)
	at dotty.tools.repl.ReplDriver.displayMembers$5$$anonfun$4(ReplDriver.scala:265)
       ...
Caused by: java.lang.ExceptionInInitializerError
	at rs$line$1.res0Show(rs$line$1)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at dotty.tools.repl.Rendering.valueOf(Rendering.scala:56)
	...
Caused by: java.lang.NullPointerException
	at rs$line$1$.<init>(rs$line$1:1)
	at rs$line$1$.<clinit>(rs$line$1)
	at rs$line$1.res0Show(rs$line$1)
	...
[error] (compile:console) Nonzero exit code: 1
[error] Total time: 5 s, completed Oct 11, 2017 1:46:22 PM
> 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions