```php
try {
    $aes = new JCryptCipherAes($key, 256);
} catch (Exception $e) {
    // Probably a JFactory::getApplication()->enqueueMessage() call and return false; here
}
```