Skip to content

System.err.println should not be used within an API #3

Open
@obourdon

Description

@obourdon

Considering the fact that your great API is supposed to be used in a lot of different contexts like web service (Tomcat, Jetty, ...) as well as applications/other APIs it is very annoying to have calls to System.err.println which

  1. may be do not produce any output (web service)
  2. may pollute the user program/other API using GnuGetopt

In my case I have replaced all calls to System.err.println to throw new IllegalArgumentException which leaves it to the user/programmer to decide what he wants to do with the Exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions