Skip to content

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Apr 1, 2016

The current code to handle upload failures if quite old and too avrdude dependant.
Actually, the 101 sketchUploader triggers a funny situation with strings being replaced and displayed with nonsense results.

This PR handles these situations by returning gracefully (without generating an exception) and then deciding which is the "right" string to display.

facchinm added 4 commits April 1, 2016 12:05
The current method of reporting upload errors is based on an exoteric combination of exceptions which makes return error code useless
The Uploader.java message() implementation is too avrdude-dependant to allow easy portability since the upload tools are becoming a lot and very different

With this commit we try to avoid exceptions and only use the external uploader's exit code to decide the status bar message.
The message can be:
- the last line containing "error" string (any case) or
- the usual avrdude message parsing (to keep compatibility with translations)

Needs testing with all platform and all supported upload tools
sandeepmistry added a commit to sandeepmistry/Arduino that referenced this pull request Jul 20, 2016
@sandeepmistry sandeepmistry merged commit 0584b2c into arduino:master Jul 20, 2016
@sandeepmistry sandeepmistry added this to the Release 1.6.10 milestone Jul 20, 2016
@sandeepmistry sandeepmistry added the Component: IDE The Arduino IDE label Jul 20, 2016
@facchinm facchinm deleted the upload_fail_handling branch January 4, 2017 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants