Mercurial Hosting > luan
diff src/luan/lib/StringLib.java @ 130:0594c132888b
cleanup
git-svn-id: https://luan-java.googlecode.com/svn/trunk@131 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 10 Jun 2014 02:43:40 +0000 |
parents | f537ff5e511d |
children | 3119326260ea |
line wrap: on
line diff
--- a/src/luan/lib/StringLib.java Mon Jun 09 09:16:16 2014 +0000 +++ b/src/luan/lib/StringLib.java Tue Jun 10 02:43:40 2014 +0000 @@ -222,7 +222,7 @@ if( Luan.toBoolean(val) ) { String replacement = Luan.asString(val); if( replacement==null ) - throw luan.JAVA.exception( "invalid replacement value (a "+Luan.type(val)+")" ); + throw luan.exception( "invalid replacement value (a "+Luan.type(val)+")" ); m.appendReplacement(sb,replacement); } i++; @@ -245,11 +245,11 @@ args[j] = m.group(j); } } - Object val = Luan.first( luan.JAVA.call(fn,"repl-arg",args) ); + Object val = Luan.first( luan.call(fn,"repl-arg",args) ); if( Luan.toBoolean(val) ) { String replacement = Luan.asString(val); if( replacement==null ) - throw luan.JAVA.exception( "invalid replacement value (a "+Luan.type(val)+")" ); + throw luan.exception( "invalid replacement value (a "+Luan.type(val)+")" ); m.appendReplacement(sb,replacement); } i++; @@ -257,7 +257,7 @@ m.appendTail(sb); return new Object[]{ sb.toString(), i }; } - throw luan.JAVA.exception( "bad argument #3 to 'gsub' (string/function/table expected)" ); + throw luan.exception( "bad argument #3 to 'gsub' (string/function/table expected)" ); } // note - String.format() is too stupid to convert between ints and floats.