Skip to content

Commit

Permalink
fix: added parameter checks to connect function
Browse files Browse the repository at this point in the history
  • Loading branch information
lem-onade committed Jul 7, 2020
1 parent 77a33dc commit c78e49e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ export class DGTSourceSolidConnector implements DGTSourceConnector<DGTSourceSoli
}

public connect(justification: DGTJustification, exchange: DGTExchange, connection: DGTConnection<DGTConnectionSolidConfiguration>, source: DGTSource<DGTSourceSolidConfiguration>): Observable<DGTConnectionSolid> {
if (!connection) {
throw new DGTErrorArgument('Argument connection should be set.', connection);
}

if (!source) {
throw new DGTErrorArgument('Argument source should be set.', source);
}

this.logger.debug(DGTSourceSolidConnector.name, 'Starting to connect to Solid', { connection, source });

let res: Observable<DGTConnection<any>> = null;
Expand Down

0 comments on commit c78e49e

Please sign in to comment.