diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2017-04-02 01:50:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-02 01:50:00 -0400 |
commit | e7112d59b811ca4a0bda448a18e0c45cb4841abb (patch) | |
tree | 2abdb4cc62be231240404ccb8d41d27be03cd458 /libraries | |
parent | 05d9dd8128b21eb64ffe6206af624237ac504b89 (diff) | |
parent | 99d3123cdbff73cb9a9dd49bc334b47a5a8b6021 (diff) | |
download | cbt-e7112d59b811ca4a0bda448a18e0c45cb4841abb.tar.gz cbt-e7112d59b811ca4a0bda448a18e0c45cb4841abb.tar.bz2 cbt-e7112d59b811ca4a0bda448a18e0c45cb4841abb.zip |
Merge pull request #474 from cvogt/chris2
saner -debug behavior
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/reflect/reflect.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libraries/reflect/reflect.scala b/libraries/reflect/reflect.scala index bd7c245..c2b05ed 100644 --- a/libraries/reflect/reflect.scala +++ b/libraries/reflect/reflect.scala @@ -65,7 +65,7 @@ package ops { } trait Module { def getMain( cls: Class[_] ): StaticMethod[Seq[String], ExitCode] = { - val f = findStaticExitMethodForced[Array[String]]( cls, "main" ) + val f = findStaticExitMethodOrFail[Array[String]]( cls, "main" ) f.copy( function = ( args: Seq[String] ) => f.function( args.to ) ) @@ -113,16 +113,16 @@ trait Module { .replace( File.separator, "." ) } - def findStaticExitMethodForced[Arg: ClassTag]( + def findStaticExitMethodOrFail[Arg: ClassTag]( cls: Class[_], name: String ): StaticMethod[Arg, ExitCode] = { - val f = findStaticMethodForced[Arg, Unit]( cls, name ) + val f = findStaticMethodOrFail[Arg, Unit]( cls, name ) f.copy( function = arg => trapExitCode { f.function( arg ); ExitCode.Success } ) } - def findStaticMethodForced[Arg, Result]( + def findStaticMethodOrFail[Arg, Result]( cls: Class[_], name: String )( implicit |