Giter Club home page Giter Club logo

Comments (5)

JamieMeyers avatar JamieMeyers commented on June 3, 2024

Hi @garmin-holder,

Great question. I believe you are talking about the shutting down case (since in the nullptr case we can't satisfy the ExceptionEncountered event requirements). In this case, we're purposefully ignoring incoming messages. Per the ExceptionEncountered Event, "Your client must send this event when it is unable to execute a directive from AVS." These are exceptional events and should only be sent when there is a failure in attempting to execute, not when we choose to ignore the directive. We're likely able to execute it, we're just unwilling to do so as ADSL is shutting down.

Does that answer your question?

Thanks,
Jamie

from avs-device-sdk.

garmin-holder avatar garmin-holder commented on June 3, 2024

Thanks for the prompt response. I didn't do a good job of stating my reason for asking. To try to get a handle on the exception reporting strategy and how the SDK participates in particular, I commented out one of the handle directive registrations in the client and then sent that directive. I was surprised so see that it didn't report an exception when the system couldn't handle that directive. I notice that that exception is sent in the shouldProcessDirective, but not where I assume the actual processing is dispatched (onDirective).

The bigger question is if the client should rely on the SDK to report exceptions, or if the client must report all exceptions, including speech failed, which is reported back to the sequencer already?

Thanks,
Alan

from avs-device-sdk.

scotthea-amazon avatar scotthea-amazon commented on June 3, 2024

Hi @garmin-holder,

The SDK should be calling sendExceptionEncountered for uhandled directives. The 0.2 code DirectiveSequencer is currently broken in this respect. Just as you reported, it drops the the unhandled directive instead. It also calls sendExceptionEncountered() in a couple of places it should not (during shutdown and when onDirective is called while directive handlers are being set). We have a fix in progress for each of these errors.

The SDK should only be calling sendExceptionEncountered() for the case where a directive could not be parsed or when no handler is registered for a directive.

Thanks,
-SWH

from avs-device-sdk.

JamieMeyers avatar JamieMeyers commented on June 3, 2024

Hi @garmin-holder, my apologies, I slightly misspoke above because I was looking at the newer code. @scotthea-amazon was correct in that in the 0.2 release, we currently have a few bugs surrounding the exception. These are fixed in the next update, hence my last comment.

To answer you question surrounding who owns sending ExceptionEncountered messages, it is split depending on the stage in the directive's lifecycle.

  • The SDK is responsible for sending ExceptionEncountered messages on failures before ADSL asks the DirectiveHandler/client to handle the Directive.
  • The DirectiveHandler/client is responsible for sending ExceptionEncountered messages on failures during prehandling or anytime a failure happens during or after handling.

from avs-device-sdk.

scotthea-amazon avatar scotthea-amazon commented on June 3, 2024

This is addressed in the 0.2.1 version just released.

from avs-device-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.