polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <paulmer...@apache.org>
Subject Re: Adding stack trace element ??
Date Sun, 28 May 2017 09:19:23 GMT
I like the idea.
I tried to put the trace into IntelliJ stacktrace analyser and it didn't
choke.
But we should assert that StackTraceElement[] and Java 9 StackWalker
don't choke either.

Another thing is that I'll go the other way around when describing where
the error did happen. From the layer to the method instead, e.g.:

at Infrastructure Layer.DerbySQLStorage
Module.derbysql-datasource-service.importService(DBCPDataSourceServiceImporter:0)

so it looks more like a stacktrace.


Niclas Hedhman a écrit :
> I tried it out and would look like;
>
>
> Caused by: org.apache.polygene.api.service.ServiceImporterException:
> org.apache.polygene.api.constraint.ConstraintViolationException:
> Constraint violation in
> ds-derbysql.[DataSourceConfiguration,EntityComposite] for method
> 'driver' with constraint "not optional(driver)", for value 'null'
> 	at method importService of
> DBCPDataSourceServiceImporter:derbysql-datasource-service() in module
> DerbySQLStorage Module' of layer 'Infrastructure Layer'.(:0)
> 	at org.apache.polygene.library.sql.datasource.AbstractDataSourceServiceImporterMixin.importService(AbstractDataSourceServiceImporterMixin.java:95)
> 	at org.apache.polygene.library.sql.datasource.AbstractDataSourceServiceImporterMixin.importService(AbstractDataSourceServiceImporterMixin.java:46)
>
>
> The (:0) at end of line is remnants of line number in "normal" stack trace
> elements.
>
>
> Cheers
>
> On Sun, May 28, 2017 at 12:34 PM, Niclas Hedhman <niclas@hedhman.org> wrote:
>
>> Hi,
>>
>> I am thinking of adding a StackTraceElement in exceptions that indicate
>> which module the problem is detected in.
>>
>> WDYT? implementation is not too hard, I think just few lines in
>> CompositeMethodModel
>>
>>
>> Cheers
>> --
>> Niclas Hedhman, Software Developer
>> http://polygene.apache.org - New Energy for Java
>>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message