File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ object DemoSpec extends DemoSpec with Property {
47
47
type ThisCommandLine = SpecCommandLine
48
48
def creator (args : List [String ]) =
49
49
new SpecCommandLine (args) {
50
- override def errorFn (msg : String ) = { println (" Error: " + msg) ; sys.exit( 0 ) }
50
+ override def errorFn (msg : String ) = { throw new Error (" Error: " + msg) }
51
51
}
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ object randomserver {
63
63
}
64
64
catch {
65
65
case e : IOException =>
66
- System .err.println(" Could not listen on port: 9999." );
67
- System .exit( - 1 )
66
+ System .err.println(" Could not listen on port: 9999." )
67
+ throw e
68
68
}
69
69
}
70
70
Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ object Test {
35
35
println(map.info)
36
36
println(map.infoIn(cil))
37
37
println(distinct.info)
38
- if ( failed) sys.exit( 1 )
38
+ assert( ! failed)
39
39
}
40
40
}
Original file line number Diff line number Diff line change 1
1
class Foo (val str : String ) {
2
+ def quit (s : Int ): Nothing = ???
2
3
def this (arr : Array [Char ]) = this ({
3
- if (arr.length == 0 ) sys.exit (1 )
4
+ if (arr.length == 0 ) quit (1 )
4
5
new String (arr)
5
6
})
6
7
}
You can’t perform that action at this time.
0 commit comments