refactor(aio): add assertNotMissingOrEmpty() helper

This commit is contained in:
Georgios Kalpakas
2017-02-27 21:04:43 +02:00
committed by Chuck Jazdzewski
parent c8d87a936b
commit c5644e5a0d
8 changed files with 39 additions and 20 deletions

View File

@ -4,6 +4,7 @@ import {EventEmitter} from 'events';
import * as fs from 'fs';
import * as path from 'path';
import * as shell from 'shelljs';
import {assertNotMissingOrEmpty} from '../common/utils';
import {CreatedBuildEvent} from './build-events';
import {UploadError} from './upload-error';
@ -12,10 +13,7 @@ export class BuildCreator extends EventEmitter {
// Constructor
constructor(protected buildsDir: string) {
super();
if (!buildsDir) {
throw new Error('Missing or empty required parameter \'buildsDir\'!');
}
assertNotMissingOrEmpty('buildsDir', buildsDir);
}
// Methods - Public