activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2305: NO-JIRA - Page.write() should throw exc...
Date Thu, 13 Sep 2018 13:32:33 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2305#discussion_r217384203
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java
---
    @@ -223,7 +223,7 @@ private int read(StorageManager storage, ActiveMQBuffer fileBuffer,
List<PagedMe
     
        public synchronized void write(final PagedMessage message) throws Exception {
           if (!file.isOpen()) {
    -         return;
    +         throw new IllegalStateException("can't write to closed file " + file);
    --- End diff --
    
    ok.. I think you should throw a proper exception, extending ActiveMQException:
    
    ActiveMQIOErrorException would be perfect there.


---

Mime
View raw message