Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:18:17+00:00 2026-05-23T03:18:17+00:00

I have an error controller where I send an email on unhandled exceptions. I

  • 0

I have an error controller where I send an email on unhandled exceptions. I want to output some variable values which reside in the ‘original’ controller (E.G indexController).

How can I access these values from the ErrorController? E.G $indexController->attr

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:18:17+00:00Added an answer on May 23, 2026 at 3:18 am

    Well, you can access the original controller action’s view variables from your error controller’s view object. You could send the required values as view variables (if possible), and then, use them in your error controller:

    // In your original controller's action
    $this->view->customVariable1 = 123;
    $this->view->customVariable2 = 'abc';
    
    // In your error controller's error action
    $cv1 = $this->view->customVariable1;
    $cv2 = $this->view->customVariable2;
    

    I can say this works, because I’ve tested displaying my view variables in error.phtml, and it displays the original controller’s view variables.

    Now, if you need more control, you could use your session to store these values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This time I have an error which I have been trying again to figure
I have a User model. I have a Session controller, in which I have
MVC 3. VB.NET I have the following controller action in my application to send
Does rails have a break statement? I'm writing a controller that has some pretty
Lets say i have a Controller like this one : @RequestMapping(method=RequestMethod.GET, value=/error) public void
I have the following setup to send email at sign up: Rails 3.0.7 ruby
I have a pretty simple Rails app and I want send an e-mail when
Hi I want to send emails to all the email comma addresses entered in
I have a registration form which displays a users Name (textbox), Email (textbox) and
When I send wrong email, validation can't pass but error messages in views don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.