File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
packages/js-dpp/lib/errors/consensus/basic/dataContract Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ const AbstractBasicError = require ( '../AbstractBasicError' ) ;
2+
3+ class DataContractNonUniqueIndexUpdateError extends AbstractBasicError {
4+ /**
5+ * @param {string } documentType
6+ * @param {string } indexName
7+ */
8+ constructor ( documentType , indexName ) {
9+ super ( `Update of non-unique index failed. Document with type ${ documentType } has updated index named "${ indexName } " out of spec.` ) ;
10+
11+ this . documentType = documentType ;
12+ this . indexName = indexName ;
13+
14+ // eslint-disable-next-line prefer-rest-params
15+ this . setConstructorArguments ( arguments ) ;
16+ }
17+
18+ /**
19+ * Get document type with changed indices
20+ *
21+ * @returns {string }
22+ */
23+ getDocumentType ( ) {
24+ return this . documentType ;
25+ }
26+
27+ /**
28+ * Get updated index name
29+ *
30+ * @returns {string }
31+ */
32+ getIndexName ( ) {
33+ return this . indexName ;
34+ }
35+ }
36+
37+ module . exports = DataContractNonUniqueIndexUpdateError ;
You can’t perform that action at this time.
0 commit comments