Be more specific about detected errors
This commit is contained in:
parent
cff039f6a5
commit
55bb0252b7
1 changed files with 11 additions and 1 deletions
|
|
@ -296,7 +296,17 @@ class Int36 {
|
|||
if (this.remainder) {
|
||||
s += ':' + Int36.octal(this.remainder);
|
||||
}
|
||||
if (DEBUG && this.error) s += " error 0x" + this.error.toString(16);
|
||||
if (DEBUG && this.error) {
|
||||
if (this.error & Int36.ERROR.OVERFLOW) {
|
||||
s += " overflow";
|
||||
}
|
||||
if (this.error & Int36.ERROR.UNDERFLOW) {
|
||||
s += " underflow";
|
||||
}
|
||||
if (this.error & Int36.ERROR.DIVZERO) {
|
||||
s += " divide-by-zero";
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue