1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2014-08-17 23:27:07 -04:00
parent 56128795f5
commit df7fcf8eae
231 changed files with 2433 additions and 3347 deletions

View File

@@ -32,7 +32,7 @@ public class Err extends RuntimeException {
return rv;
} @gplx.Internal protected Err() {}
@gplx.Internal protected static Err exc_(Exception thrown, String hdr) {
Err rv = hdr_(hdr);
Err rv = hdr_(hdr + ":" + Err_.Message_lang(thrown)); // add a better error description; DATE:2014-08-15
rv.inner = convert_(thrown);
for (int i = 0; i < rv.inner.callStack.Count(); i++) {
ErrProcData itm = (ErrProcData)rv.inner.callStack.FetchAt(i);

View File

@@ -221,6 +221,10 @@ public class Bry_ {
byte[] ary = Bry_.Mid(src, bgn, end);
return String_.new_utf8_(ary);
}
public static byte[] Mid_safe(byte[] src, int bgn, int end) {
try {return Mid(src, bgn, end);}
catch (Exception e) {Err_.Noop(e); return Bry_.Add_w_dlm(Byte_ascii.Space, Bry_.XbyInt(bgn), Bry_.XbyInt(end));}
}
public static byte[] Mid(byte[] src, int bgn) {return Mid(src, bgn, src.length);}
public static byte[] Mid_or(byte[] src, int bgn, int end, byte[] or) {
int src_len = src.length;