• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / roku-debug / #1977

pending completion
#1977

push

TwitchBronBron
Fix issue with truncated debugger paths

999 of 1900 branches covered (52.58%)

Branch coverage included in aggregate %.

2082 of 3571 relevant lines covered (58.3%)

16.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

7.89
/src/debugProtocol/responses/ExecuteResponseV3.ts
1
import { SmartBuffer } from 'smart-buffer';
1✔
2
import { util } from '../../util';
1✔
3

4
export class ExecuteResponseV3 {
1✔
5
    constructor(buffer: Buffer) {
6
        // The smallest a request response can be
7
        if (buffer.byteLength >= 12) {
×
8
            try {
×
9
                let bufferReader = SmartBuffer.fromBuffer(buffer);
×
10
                this.requestId = bufferReader.readUInt32LE(); // request_id
×
11
                this.errorCode = bufferReader.readUInt32LE(); // error_code
×
12
                this.executeSuccess = bufferReader.readUInt8() !== 0; //execute_success
×
13
                this.runtimeStopCode = bufferReader.readUInt8(); //runtime_stop_code
×
14

15
                this.compileErrors = new ExecuteErrors(bufferReader);
×
16
                this.runtimeErrors = new ExecuteErrors(bufferReader);
×
17
                this.otherErrors = new ExecuteErrors(bufferReader);
×
18

19
                this.success = this.compileErrors.success && this.runtimeErrors.success && this.otherErrors.success;
×
20
                this.readOffset = bufferReader.readOffset;
×
21
            } catch (error) {
22
                // Could not parse
23
            }
24
        }
25
    }
26
    public success = false;
×
27
    public readOffset = 0;
×
28
    /**
29
     * true if code ran and completed without    errors, false otherwise
30
     */
31
    public executeSuccess = false;
×
32
    public runtimeStopCode: number;
33

34
    public compileErrors: ExecuteErrors;
35
    public runtimeErrors: ExecuteErrors;
36
    public otherErrors: ExecuteErrors;
37

38
    // response fields
39
    public requestId = -1;
×
40
    public errorCode = -1;
×
41
}
42

43
class ExecuteErrors {
44
    public constructor(bufferReader: SmartBuffer) {
45
        if (bufferReader.length >= 4) {
×
46
            const errorCount = bufferReader.readUInt32LE();
×
47
            for (let i = 0; i < errorCount; i++) {
×
48
                const message = util.readStringNT(bufferReader);
×
49
                if (message) {
×
50
                    this.messages.push(message);
×
51
                }
52
            }
53
            this.success = this.messages.length === errorCount;
×
54
        }
55
    }
56

57
    public success = false;
×
58

59
    public messages: string[] = [];
×
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc