Skip to content

Soften error message when docs cannot be opened automatically. - #510

Closed
joa-quim wants to merge 1 commit into
masterfrom
softerrmsg
Closed

joa-quim wants to merge 1 commit into
masterfrom
softerrmsg

Conversation

@joa-quim

Copy link
Copy Markdown
Member

Address issue #498

@PaulWessel PaulWessel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though we wanted the error/warning to go to stderr and then print the URL to stdout? Use Report for the former and now we will have to initialize the IO machinery to write one text record to stdout. Or we say screw it and just write directly with printf and not worry about the use of docs from other environments.

@joa-quim

Copy link
Copy Markdown
Member Author

I was just trying to avoid that ugly docs [ERROR]: since this not really a user error. Looked into the code but without stepping though it's really hard to tell if Report is writing to stderr or stdout. Is there a way (without fprintf) to write the text to stderror and not printing the docs [ERROR]: bit?

@PaulWessel

Copy link
Copy Markdown
Contributor

I think we should check the system return and if xdg-open is not found then it is an error and we do as before. However, if it is not that type of error then we can do a soft GMT_Message and then just do a printf of the URL.

@joa-quim

Copy link
Copy Markdown
Member Author

But this only about xdg-open? And what other type of error would merit a soft message whilst this get the harsh one?
This issue is getting more complicated than it worth.

@PaulWessel

Copy link
Copy Markdown
Contributor

yes, I think open and cmd start will always be available. I think only "not found" is an error. Reasons for other failures would be considered soft and have to do with X11 tunneling etc. Given that we are addressing an issue affecting 1% of users I think handling this 1st order error is more than we need to worry about.

@joa-quim joa-quim closed this Mar 18, 2019
@joa-quim
joa-quim deleted the softerrmsg branch March 18, 2019 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants