This repository was archived by the owner on Sep 4, 2020. It is now read-only.
File tree 4 files changed +12
-1
lines changed 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ Command.prototype._initialize = function(connection) {
45
45
46
46
if ( this . argumentsSchema ) {
47
47
var validation = tv4 . validateResult ( args , this . argumentsSchema ) ;
48
+
49
+ if ( validation . missing . length > 0 ) {
50
+ throw new Error ( 'Validation schema "' + validation . missing [ 0 ] + '" missing!' ) ;
51
+ }
48
52
49
53
if ( ! validation . valid ) {
50
54
if ( validation . error . subErrors && validation . error . subErrors . length > 0 ) {
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ Task.prototype._initialize = function(connection) {
35
35
if ( this . argumentsSchema ) {
36
36
var validation = tv4 . validateResult ( args , this . argumentsSchema ) ;
37
37
38
+ if ( validation . missing . length > 0 ) {
39
+ throw new Error ( 'Validation schema "' + validation . missing [ 0 ] + '" missing!' ) ;
40
+ }
41
+
38
42
if ( ! validation . valid ) {
39
43
if ( validation . error . subErrors && validation . error . subErrors . length > 0 ) {
40
44
validation . error . subErrors = _ . sortBy ( validation . error . subErrors , function ( s ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " devicestack" ,
3
- "version" : " 1.10.3 " ,
3
+ "version" : " 1.10.4 " ,
4
4
"description" : " This module helps you to represent a device and its protocol." ,
5
5
"private" : false ,
6
6
"main" : " index.js" ,
Original file line number Diff line number Diff line change
1
+ ## v1.10.4
2
+ - command and task: throw error if validation schema is missing
3
+
1
4
## v1.10.3
2
5
- DeviceGuider: introduce DeviceNotFound error
3
6
- SerialDevice: introduce PortNotFound and PortAccessDenied error
You can’t perform that action at this time.
0 commit comments