forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable-errors.ts
More file actions
74 lines (66 loc) · 2.27 KB
/
Copy pathtable-errors.ts
File metadata and controls
74 lines (66 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Returns an error to be thrown when attempting to find an unexisting column.
* @param id Id whose lookup failed.
* @docs-private
*/
export function getTableUnknownColumnError(id: string) {
return Error(`Could not find column with id "${id}".`);
}
/**
* Returns an error to be thrown when two column definitions have the same name.
* @docs-private
*/
export function getTableDuplicateColumnNameError(name: string) {
return Error(`Duplicate column definition name provided: "${name}".`);
}
/**
* Returns an error to be thrown when there are multiple rows that are missing a when function.
* @docs-private
*/
export function getTableMultipleDefaultRowDefsError() {
return Error(`There can only be one default row without a when predicate function.`);
}
/**
* Returns an error to be thrown when there are no matching row defs for a particular set of data.
* @docs-private
*/
export function getTableMissingMatchingRowDefError(data: any) {
return Error(`Could not find a matching row definition for the` +
`provided row data: ${JSON.stringify(data)}`);
}
/**
* Returns an error to be thrown when there is no row definitions present in the content.
* @docs-private
*/
export function getTableMissingRowDefsError() {
return Error('Missing definitions for header, footer, and row; ' +
'cannot determine which columns should be rendered.');
}
/**
* Returns an error to be thrown when the data source does not match the compatible types.
* @docs-private
*/
export function getTableUnknownDataSourceError() {
return Error(`Provided data source did not match an array, Observable, or DataSource`);
}
/**
* Returns an error to be thrown when the text column cannot find a parent table to inject.
* @docs-private
*/
export function getTableTextColumnMissingParentTableError() {
return Error(`Text column could not find a parent table for registration.`);
}
/**
* Returns an error to be thrown when a table text column doesn't have a name.
* @docs-private
*/
export function getTableTextColumnMissingNameError() {
return Error(`Table text column must have a name.`);
}