Throwing Errors

13 views
Skip to first unread message

eisior...@gmail.com

unread,
Jun 13, 2013, 6:01:57 AM6/13/13
to uimafi...@googlegroups.com
Hello,

i implemented calls to a

CollectionProcessingEngine engine = builder.createCpe(status);
engine.process();

try {
                            synchronized (status) {
                                    while (status.isProcessing) {
                                            status.wait();
                                    }
                            }
                    }
                    catch (InterruptedException e) {
                        throw new AnalysisEngineProcessException(e);
                       
                    }

                    if (status.exceptions.size() > 0) {
                            throw new AnalysisEngineProcessException(status.exceptions.get(0));
                    }

When within one of the Annotators an error is thrown nothing is written to the console. How can i achieve to print everything to the console instead of just the log files. Here is my status callback listener:

private static class StatusCallbackListenerImpl
        implements StatusCallbackListener
    {

        private final List<Exception> exceptions = new ArrayList<Exception>();
        private boolean isProcessing = true;

        public void entityProcessComplete(CAS arg0, EntityProcessStatus arg1)
        {
                if (arg1.isException()) {
                        for (Exception e : arg1.getExceptions()) {
                                exceptions.add(e);
                        }
                }
        }

        public void aborted()
        {
                synchronized (this) {
                        if (isProcessing) {
                                isProcessing = false;
                                notify();
                        }
                }
        }

        public void batchProcessComplete()
        {
                // Do nothing
        }

        public void collectionProcessComplete()
        {
                synchronized (this) {
                        if (isProcessing) {
                                isProcessing = false;
                                notify();
                        }
                }
        }

        public void initializationComplete()
        {
                // Do nothing
        }

        public void paused()
        {
                // Do nothing
        }

        public void resumed()
        {
                // Do nothing
        }
    }

Richard Eckart de Castilho

unread,
Jun 13, 2013, 6:04:23 AM6/13/13
to uimafi...@googlegroups.com
Am 13.06.2013 um 12:01 schrieb eisior...@gmail.com:

> When within one of the Annotators an error is thrown nothing is written to the console. How can i achieve to print everything to the console instead of just the log files.

Check what logging system you are using and tell it to write to the console in addition to writing to the log files.
Neither UIMA not uimaFIT configure the logging sub-system, so you must be doing that somewhere else.

Cheers,

-- Richard

Reply all
Reply to author
Forward
0 new messages