diff --git a/src/try/success.ts b/src/try/success.ts index f109014..e38ef2e 100644 --- a/src/try/success.ts +++ b/src/try/success.ts @@ -30,7 +30,7 @@ class Success implements Try { return this; } else { - return new Failure(new Error('asdf')); + return new Failure(new Error(`Predicate does not hold for ${this.value}`)); } } diff --git a/test/try/success.ts b/test/try/success.ts index 9b60dc5..6ebd620 100644 --- a/test/try/success.ts +++ b/test/try/success.ts @@ -28,7 +28,7 @@ test('Success#filter', (t: TestContext) => { ); t.deepEqual( success.filter((v: string) => v === 'world'), - new Failure(new Error('asdf')) + new Failure(new Error('Predicate does not hold for hello')) ); });