Forcing an error message in case of missing profile

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
daxbin
Posts: 13
Joined: Thu Feb 16, 2017 2:03 pm

Forcing an error message in case of missing profile

Post by daxbin »

I'm using xRoute via Java WS API.

Years ago I got the following exception, if I used a wrong (e.g. misspelled) profile name:

Code: Select all

com.ptvag.jabba.core.exception.UnexpectedException:
requested profile does not exist: xxxxx
Now I don't get an error but a regular result because xRoute falls back to a default profile silently
(it only logs a warning "Requested profile xxxxx.xml which does not exist, using default.xml instead.")

How can I get the xRoute to generate an error message again?
I can't find the corresponding entry in e.g. xroute.properties.


Best regards, Birk
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Forcing an error message in case of missing profile

Post by Bernd Welter »

Hello Dirk,

check xserver.properites... as the desired behaviour is a FRAMEWORK topic it is a generic key:
# fail if a non-existing profile is requested
#
#failOnIllegalProfile=false
failOnIllegalProfile=true
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
daxbin
Posts: 13
Joined: Thu Feb 16, 2017 2:03 pm

Re: Forcing an error message in case of missing profile

Post by daxbin »

Hello Bernd,

thanks a lot, that was exactly what I was looking for.

Best regards,
Birk

BTW, Your red Xmas coat looks great!
Post Reply