[osmosis-dev] newbie installation question
Brett Henderson
brett at bretth.com
Fri Dec 3 00:13:24 GMT 2010
I think the only real way to "turn it off" is to catch the exception in code
and display a friendly message instead. None of Osmosis has really been
coded to support that though. I try to ensure that exceptions contain
enough information to diagnose the error, but it can require wading through
a long stack trace to see all the "caused by" messages.
All exceptions are currently thrown as OsmosisRuntimeException which
basically means that no distinction is made between different types of
errors and this prevents each different error type from being handled in a
user friendly way. If more user friendly messages were desired, it would be
necessary to re-think the exception hierarchy and distinguish between
unknown errors and simple user errors such as a missing file name. Given
the nature of Osmosis as a developer support tool I'm not sure that the
effort is warranted. The current error handling is the simplest thing that
works.
What is your reason for turning it off? Simply disabling stack trace in its
current form would make it impossible to diagnose a large number of error
conditions.
On Fri, Dec 3, 2010 at 8:00 AM, Rich d'Rich <rich.d.rich at gmail.com> wrote:
> Just a cheeky but related question here. Is there a way to turn off the
> stack dump when an error (especially an obvious user error like a missing
> file) occurs?
>
> I can't find a way to do it in Java, but that might be my ignorance.
>
> Thanks, Rich
>
>
> On Thu, Dec 2, 2010 at 7:21 PM, Scott Crosby <scrosby at cs.rice.edu> wrote:
>
>> On Wed, Dec 1, 2010 at 6:23 AM, Anthony <osm at inbox.org> wrote:
>> > On Wed, Dec 1, 2010 at 2:56 AM, Peter Körner <osm-lists at mazdermind.de>
>> wrote:
>> >> Am 01.12.2010 05:36, schrieb Anthony:
>> >>>
>> >>> Is this the right list for a newbie osmosis installation question, or
>> >>> should I use a different list?
>> >>
>> >> Just ask your question, you'll be served.
>> >
>> > Okay. This is going to be really stupid...
>> >
>> > How do I install it in order to convert osm files to pbf files?
>> >
>> > O downloaded
>> http://dev.openstreetmap.org/~bretth/osmosis-build/osmosis-latest.tgz<http://dev.openstreetmap.org/%7Ebretth/osmosis-build/osmosis-latest.tgz>
>> > and unpacked it, went to bin, ran ./osmosis. It complained that I
>> > didn't have java installed. So I ran "sudo aptitude install
>> > gcj-4.4-jre-headless". Then I created a file star.osm:
>> >
>> > ---
>> > <osm version="0.6">
>> > <relation id="1" version="9" timestamp="2010-06-25T11:33:43Z"
>> changeset="1" />
>> > </osm>
>> > ---
>> >
>> > I then ran the command "./osmosis --rx star.osm --sort --write-bin
>> star.osm.pbf"
>> >
>> > SEVERE: Thread for task 1-rx failed
>> > java.lang.AssertionError
>> > at
>> crosby.binary.osmosis.OsmosisSerializer.switchTypes(OsmosisSerializer.java:397)
>>
>> This assertion was to aid in debugging. But it also mis-fires if you
>> try to serialize something that contains no data. I'll push the fix
>> into SVN at some point.
>>
>> Scott
>>
>> _______________________________________________
>> osmosis-dev mailing list
>> osmosis-dev at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/osmosis-dev
>>
>
>
> _______________________________________________
> osmosis-dev mailing list
> osmosis-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/osmosis-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20101203/8f256dd0/attachment.html>
More information about the osmosis-dev
mailing list