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 7000153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:38:04+00:00 2026-05-27T20:38:04+00:00

I came across this in some example code: – (IBAction) startPlayLowNote:(id)sender { UInt32 noteNum

  • 0

I came across this in some example code:

- (IBAction) startPlayLowNote:(id)sender {

  UInt32 noteNum = kLowNote;
  UInt32 onVelocity = 127;
  UInt32 noteCommand =   kMIDIMessage_NoteOn << 4 | 0;

    OSStatus result = noErr;
  require_noerr (result = MusicDeviceMIDIEvent (self.samplerUnit, noteCommand, noteNum, onVelocity, 0), logTheError);

logTheError:
    if (result != noErr) NSLog (@"Unable to start playing the low note. Error code: %d '%.4s'\n", (int) result, (const char *)&result);
}

What does “logTheError:” do? What is this syntax called? Where can I go for more information on it?

  • 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-27T20:38:05+00:00Added an answer on May 27, 2026 at 8:38 pm

    logtheError: is a label. The require_noerr macro has a goto in it that will jump to a specified label in the case of an error. Here’s a simplified and expanded goto/label example without any funny business or macros:

    int call2Functions(void)
    {
       int err = function();
       if (err)
         goto errorExit;
    
       err = function2();
    
     errorExit:
       return err;
     }
    

    It’s C syntax originally. You can learn more in the C standard, section 6.8.1 Labeled statements.

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

Sidebar

Related Questions

The other day, I came across this construct: static_cast<size_type>(-1) in some example C++ code,
I was looking at some PETSc example code, and I came across this snippet:
While looking through some example C code, I came across this: y -= m
I recently came across this in some code - basically someone trying to create
I came across this line in some code and can't find the syntax defined
Yesterday I read some code of a colleague and came across this: class a_class
I was just looking at some example code and came across a line, I
While refactoring some code, I came across this strange compile error: The constructor call
I am trying to get some code working from an example I came across.
I realise this code is faulty. However, I came across some curious behaviour which

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.