# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 14682 | Git Fusion |
Git Fusion branch management Imported from Git ghost-of-change-num: 960958 ghost-of-sha1: 005052ae424bd69f426f7209e741ca1c8c3253c7 ghost-precedes-sha1: ad052c71a568ef12165e143a6866ad9ceffbb4a1 parent-branch: None@960958 push-state: incomplete |
||
#3 | 14581 | Sven Erik Knop |
Fixed error handling in P4Ruby. The error message string did not get properly set in the exception and P4Message object. This is because theP4API Error class does not have a proper copy constructor. Since it has a decent assignment operator, I gave P4Error an Error field and removed the superclass, which solved the problem and also made the code more readable. I also moved the Reset of the Result object in P4ClientAPI before the connection check, so that 'not connected' can be shown in the exception instead of the previous exception in case the connection is lost. Bug fix to previously unreleased behaviour. |
||
#2 | 14580 | tony |
Added P4::Message#msgid method that returns the UniqueCode of any error message - much easier than matching it's output text. User-visible enhancement documented in p4rubynotes.txt |
||
#1 | 14579 | tony |
Make new class P4::Message for returning Error objects to the user. Currently handles errors and warnings, but could potentially be used for output too (might bloat people's code though). Essentially, if you're using a 2010.2 or later client, or if you've set your api_level to 68 or higher, the P4#errors and P4#warnings arrays will be populated with P4::Message objects instead of strings. Users of older API's, or those who set their api_level to 67 or lower in their scripts will get the old behaviour. P4::Message objects have the following methods: severity() - returns the severity generic() - returns the generic code to_s() - converts the message to a string inspect() - returns a string showing the message details. User-visible enhancement documented in p4rubynotes.txt |