Exception: CorreiosException
- Inherits:
-
StandardError
- Object
- StandardError
- CorreiosException
show all
- Defined in:
- lib/correios_exception.rb
Direct Known Subclasses
Correios::Pricefier::CalculateDeadline, Correios::Pricefier::CalculateDeadlineWithDate, Correios::Pricefier::CalculateDeadlineWithRestrictions, Correios::Pricefier::CalculatePrice, Correios::Pricefier::CalculatePriceDeadline, Correios::Pricefier::CalculatePriceDeadlineWithDate, Correios::Pricefier::CalculatePriceDeadlineWithRestrictions, Correios::Pricefier::CalculatePriceFAC, Correios::Pricefier::CalculatePriceWithDate, Correios::Pricefier::ListServices, Correios::Pricefier::ListServicesSTAR, Correios::ReverseLogistics::CalculateTicketNumberCheckDigit, Correios::ReverseLogistics::CancelShipping, Correios::ReverseLogistics::CreateShippings, Correios::ReverseLogistics::CreateShippingsWithCollection, Correios::ReverseLogistics::RequestTicketNumbers, Correios::ReverseLogistics::TrackShipping, Correios::ReverseLogistics::TrackShippingsByDate, Correios::SRO::TrackShippings, Correios::SRO::TrackShippingsList, Correios::Sigep::CalculateLabelNumberCheckDigit, Correios::Sigep::CancelShipping, Correios::Sigep::CheckCardStatus, Correios::Sigep::CheckServiceAvailability, Correios::Sigep::CreateShippings, Correios::Sigep::RequestLabelNumbers, Correios::Sigep::RequestShippingsXML, Correios::Sigep::SearchAvailableAdditionalServices, Correios::Sigep::SearchCustomer, Correios::Sigep::SearchZipCode, Correios::Sigep::TrackShippings
Instance Method Summary
collapse
Instance Method Details
6
7
8
9
10
|
# File 'lib/correios_exception.rb', line 6
def format_error_message(message)
message = message.to_s.gsub('(soap:Server)', '')
message = message.strip
message.capitalize
end
|
#generate_exception(message) ⇒ Object
2
3
4
|
# File 'lib/correios_exception.rb', line 2
def generate_exception(message)
raise CorreiosException, format_error_message(message)
end
|