Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThrowFromClientLoggerCheck failed for throwing IO exception but logAndThrow only take RuntimeException #5138

Closed
mssfang opened this issue Aug 28, 2019 · 0 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@mssfang
Copy link
Member

mssfang commented Aug 28, 2019

ThrowFromClientLoggerCheck failed for throwing IO exception but logAndThrow only take RuntimeException

 <suppress checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" files="com.azure.storage.blob.BlobInputStream.java"/>
 <suppress checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" files="com.azure.storage.blob.BlobOutputStream.java"/>
 <suppress checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" files="com.azure.storage.blob.BlockBlobClient.java"/>
 <suppress checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" files="com.azure.storage.blob.PageBlobAsyncClient.java"/>

Errors:

[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobInputStream.java:159:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobInputStream.java:194:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobInputStream.java:242:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobInputStream.java:403:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobOutputStream.java:98:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobOutputStream.java:139:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlobOutputStream.java:182:17: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlockBlobClient.java:158:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\BlockBlobClient.java:189:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
[ERROR] C:\Users\shafang\work\azure-sdk-for-java\sdk\storage\azure-storage-blob\src\main\java\com\azure\storage\blob\PageBlobAsyncClient.java:541:13: Directly throwing an exception is disallowed. Must throw through 'ClientLogger' API, either of 'logger.logExceptionAsError' or 'logger.logExceptionAsWarning' where 'logger' is type of ClientLogger from Azure Core package. [ThrowFromClientLogger]
@mssfang mssfang added the Client This issue points to a problem in the data-plane of the library. label Aug 28, 2019
@mssfang mssfang changed the title ThrowFromClientLoggerCheck suppression: ThrowFromClientLoggerCheck suppression: Storage Blob Aug 28, 2019
@mssfang mssfang added the Storage Storage Service (Queues, Blobs, Files) label Aug 28, 2019
@mssfang mssfang changed the title ThrowFromClientLoggerCheck suppression: Storage Blob ThrowFromClientLoggerCheck failed for throwing IO exception but logAndThrow only take RuntimeException Aug 30, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants