PageSourceSearch

https://ivaprime.com/static/js/errorHandler.js

js ivaprime.com collected 2026-10-03 21:38:05 UTC 1,017 bytes, 44 lines download raw bytes

1/**
2 * FileIO
3 */
4class ParsingError extends Error {
5    constructor(name, description) {
6        super(description);
7        this.name = `Parsing error: ${name}`;
8    };
9};
10
11
12/**
13 * Primers
14 */
15/**
16 * Error for when primer extension encounters an ambigous base (non-ACTG)
17 */
18class AmbiguousBaseError extends Error {
19    constructor(seq) {
20        super(`While extending the primers an ambigous base was encountered: ${seq}`);
21        this.name = "Primer Design Failed: Ambiguous bases";
22    };
23};
24
25
26/**
27 * Error for when primer extension would go beyond bounds of a linear sequence
28 */
29class OutOfBasesError extends Error {
30    constructor() {
31        super("Cannot extend primer beyond the boundaries of a linear sequence.");
32        this.name = "Primer Design Failed: Reached sequence bounds";
33    };
34};
35
36
37/**
38 * Handle error by displaying it as an alert for the user
39 * 
40 * @param {Error} error - Caught error class to be handled
41 */
42function handleError(error) {
43    Alerts.error(error.name, error.message);
44};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.