GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Venus::Fault(3) User Contributed Perl Documentation Venus::Fault(3)

Venus::Fault - Fault Class

Fault Class for Perl 5

  package main;
  use Venus::Fault;
  my $fault = Venus::Fault->new;
  # $fault->throw;

This package represents a generic system error (exception object).

This package provides the following methods:

  explain() (string)

The explain method returns the error message and is used in stringification operations.

Since 1.80

explain example 1
  # given: synopsis;
  my $explain = $fault->explain;
  # "Exception! in ...
    

  frames() (arrayref)

The frames method returns the compiled and stashed stack trace data.

Since 1.80

frames example 1
  # given: synopsis;
  my $frames = $fault->frames;
  # [
  #   ...
  #   [
  #     "main",
  #     "t/Venus_Fault.t",
  #     ...
  #   ],
  # ]
    

  throw(string $message) (Venus::Fault)

The throw method throws an error if the invocant is an object, or creates an error object using the arguments provided and throws the created object.

Since 1.80

throw example 1
  # given: synopsis;
  my $throw = $fault->throw;
  # bless({ ... }, 'Venus::Fault')
    

  trace(number $offset, number $limit) (Venus::Fault)

The trace method compiles a stack trace and returns the object. By default it skips the first frame.

Since 1.80

trace example 1
  # given: synopsis;
  my $trace = $fault->trace;
  # bless({ ... }, 'Venus::Fault')
    
trace example 2
  # given: synopsis;
  my $trace = $fault->trace(0, 1);
  # bless({ ... }, 'Venus::Fault')
    
trace example 3
  # given: synopsis;
  my $trace = $fault->trace(0, 2);
  # bless({ ... }, 'Venus::Fault')
    

This package overloads the following operators:

This package overloads the "" operator.

example 1

  # given: synopsis;
  my $result = "$fault";
  # "Exception!"
    
This package overloads the "eq" operator.

example 1

  # given: synopsis;
  my $result = $fault eq 'Exception!';
  # 1
    
This package overloads the "ne" operator.

example 1

  # given: synopsis;
  my $result = $fault ne 'exception!';
  # 1
    
This package overloads the "qr" operator.

example 1

  # given: synopsis;
  my $test = 'Exception!' =~ qr/$fault/;
  # 1
    
This package overloads the "~~" operator.

example 1

  # given: synopsis;
  my $result = $fault ~~ 'Exception!';
  # 1
    

Awncorp, "awncorp@cpan.org"

Copyright (C) 2022, Awncorp, "awncorp@cpan.org".

This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.

2023-11-27 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.