Change 14579

tony
tony committed this change into //guest/perforce_software/p4ruby/main
Request Review
Download .zip
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
  • Files 11
  • Comments 0
8 edited 3 added 0 deleted
MANIFEST#9
Loading...
clientuserruby.cpp#12
Loading...
clientuserruby.h#6
Loading...
lib/P4.rb#13
Loading...
p4.cpp#33
Loading...
p4clientapi.cpp#29
Loading...
p4error.cpp#1
Loading...
p4error.h#1
Loading...
p4result.cpp#4
Loading...
p4result.h#4
Loading...
test/14_output.rb#1
Loading...
Tip: Use n and p to cycle through the changes.