Skip to content

Commit bb4035b

Browse files
authored
Throw invalid argument exception from cache helper (#40287)
1 parent 281ed58 commit bb4035b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Foundation/helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function broadcast($event = null)
228228
* @param dynamic key|key,default|data,expiration|null
229229
* @return mixed|\Illuminate\Cache\CacheManager
230230
*
231-
* @throws \Exception
231+
* @throws \InvalidArgumentException
232232
*/
233233
function cache()
234234
{
@@ -243,7 +243,7 @@ function cache()
243243
}
244244

245245
if (! is_array($arguments[0])) {
246-
throw new Exception(
246+
throw new InvalidArgumentException(
247247
'When setting a value in the cache, you must pass an array of key / value pairs.'
248248
);
249249
}

0 commit comments

Comments
 (0)